* * @psalm-var IssuerMetadataObject */ private $metadata; /** @var string[] */ private static $requiredKeys = [ 'issuer', 'authorization_endpoint', 'jwks_uri', ]; /** * IssuerMetadata constructor. * * @param array $claims */ public function __construct( string $issuer, string $authorizationEndpoint, string $jwksUri, array $claims = [] ) { $requiredClaims = [ 'issuer' => $issuer, 'authorization_endpoint' => $authorizationEndpoint, 'jwks_uri' => $jwksUri, ]; /** @var IssuerMetadataObject $merged */ $merged = array_merge($claims, $requiredClaims); $this->metadata = $merged; } /** * @param array $claims * * @return static * * @psalm-param IssuerMetadataObject $claims */ public static function fromArray(array $claims): self { $missingKeys = array_diff(self::$requiredKeys, array_keys($claims)); if (0 !== count($missingKeys)) { throw new InvalidArgumentException('Invalid issuer metadata. Missing keys: ' . implode(', ', $missingKeys)); } return new static( $claims['issuer'], $claims['authorization_endpoint'], $claims['jwks_uri'], $claims ); } public function getIssuer(): string { return $this->metadata['issuer']; } public function getAuthorizationEndpoint(): string { return $this->metadata['authorization_endpoint']; } public function getTokenEndpoint(): ?string { return $this->metadata['token_endpoint'] ?? null; } public function getUserinfoEndpoint(): ?string { return $this->metadata['userinfo_endpoint'] ?? null; } public function getRegistrationEndpoint(): ?string { return $this->metadata['registration_endpoint'] ?? null; } public function getJwksUri(): string { return $this->metadata['jwks_uri']; } public function getScopesSupported(): ?array { return $this->metadata['scopes_supported'] ?? null; } public function getResponseTypesSupported(): array { return $this->metadata['response_types_supported']; } public function getResponseModesSupported(): array { return $this->metadata['response_modes_supported'] ?? ['query', 'fragment']; } public function getGrantTypesSupported(): array { return $this->metadata['grant_types_supported'] ?? ['authorization_code', 'implicit']; } public function getAcrValuesSupported(): ?array { return $this->metadata['acr_values_supported'] ?? null; } public function getSubjectTypesSupported(): array { return $this->metadata['subject_types_supported'] ?? ['public']; } public function getDisplayValuesSupported(): ?array { return $this->metadata['display_values_supported'] ?? null; } public function getClaimTypesSupported(): array { return $this->metadata['claim_types_supported'] ?? ['normal']; } public function getClaimsSupported(): ?array { return $this->metadata['claims_supported'] ?? null; } public function getServiceDocumentation(): ?string { return $this->metadata['service_documentation'] ?? null; } public function getClaimsLocalesSupported(): ?array { return $this->metadata['claims_locales_supported'] ?? null; } public function getUiLocalesSupported(): ?array { return $this->metadata['ui_locales_supported'] ?? null; } public function isClaimsParameterSupported(): bool { return $this->metadata['claims_parameter_supported'] ?? false; } public function isRequestParameterSupported(): bool { return $this->metadata['request_parameter_supported'] ?? false; } public function isRequestUriParameterSupported(): bool { return $this->metadata['request_uri_parameter_supported'] ?? false; } public function isRequireRequestUriRegistration(): bool { return $this->metadata['require_request_uri_registration'] ?? true; } public function getOpPolicyUri(): ?string { return $this->metadata['op_policy_uri'] ?? null; } public function getOpTosUri(): ?string { return $this->metadata['op_tos_uri'] ?? null; } public function getCodeChallengeMethodsSupported(): ?array { return $this->metadata['code_challenge_methods_supported'] ?? null; } public function getTokenEndpointAuthMethodsSupported(): array { return $this->metadata['token_endpoint_auth_methods_supported'] ?? ['client_secret_basic']; } public function getTokenEndpointAuthSigningAlgValuesSupported(): array { /** @var list $default */ $default = ['RS256']; return $this->metadata['token_endpoint_auth_signing_alg_values_supported'] ?? $default; } public function getIdTokenSigningAlgValuesSupported(): array { /** @var list $default */ $default = ['RS256']; return $this->metadata['id_token_signing_alg_values_supported'] ?? $default; } public function getIdTokenEncryptionAlgValuesSupported(): array { return $this->metadata['id_token_encryption_alg_values_supported'] ?? []; } public function getIdTokenEncryptionEncValuesSupported(): array { return $this->metadata['id_token_encryption_enc_values_supported'] ?? []; } public function getUserinfoSigningAlgValuesSupported(): array { return $this->metadata['userinfo_signing_alg_values_supported'] ?? []; } public function getUserinfoEncryptionAlgValuesSupported(): array { return $this->metadata['userinfo_encryption_alg_values_supported'] ?? []; } public function getUserinfoEncryptionEncValuesSupported(): array { return $this->metadata['userinfo_encryption_enc_values_supported'] ?? []; } public function getAuthorizationSigningAlgValuesSupported(): array { return $this->metadata['authorization_signing_alg_values_supported'] ?? []; } public function getAuthorizationEncryptionAlgValuesSupported(): array { return $this->metadata['authorization_encryption_alg_values_supported'] ?? []; } public function getAuthorizationEncryptionEncValuesSupported(): array { return $this->metadata['authorization_encryption_enc_values_supported'] ?? []; } public function getIntrospectionEndpoint(): ?string { return $this->metadata['introspection_endpoint'] ?? null; } public function getIntrospectionEndpointAuthMethodsSupported(): array { return $this->metadata['introspection_endpoint_auth_methods_supported'] ?? []; } public function getIntrospectionEndpointAuthSigningAlgValuesSupported(): array { return $this->metadata['introspection_endpoint_auth_signing_alg_values_supported'] ?? []; } public function getIntrospectionSigningAlgValuesSupported(): array { return $this->metadata['introspection_signing_alg_values_supported'] ?? []; } public function getIntrospectionEncryptionAlgValuesSupported(): array { return $this->metadata['introspection_encryption_alg_values_supported'] ?? []; } public function getIntrospectionEncryptionEncValuesSupported(): array { return $this->metadata['introspection_encryption_enc_values_supported'] ?? []; } public function getRequestObjectSigningAlgValuesSupported(): array { /** @var list $default */ $default = ['none', 'RS256']; return $this->metadata['request_object_signing_alg_values_supported'] ?? $default; } public function getRequestObjectEncryptionAlgValuesSupported(): array { return $this->metadata['request_object_encryption_alg_values_supported'] ?? []; } public function getRequestObjectEncryptionEncValuesSupported(): array { return $this->metadata['request_object_encryption_enc_values_supported'] ?? []; } public function getRevocationEndpoint(): ?string { return $this->metadata['revocation_endpoint'] ?? null; } public function getRevocationEndpointAuthMethodsSupported(): array { return $this->metadata['revocation_endpoint_auth_methods_supported'] ?? []; } public function getRevocationEndpointAuthSigningAlgValuesSupported(): array { return $this->metadata['revocation_endpoint_auth_signing_alg_values_supported'] ?? []; } public function getCheckSessionIframe(): ?string { return $this->metadata['check_session_iframe'] ?? null; } public function getEndSessionIframe(): ?string { return $this->metadata['end_session_iframe'] ?? null; } public function isFrontchannelLogoutSupported(): bool { return $this->metadata['frontchannel_logout_supported'] ?? false; } public function isFrontchannelLogoutSessionSupported(): bool { return $this->metadata['frontchannel_logout_session_supported'] ?? false; } public function isBackchannelLogoutSupported(): bool { return $this->metadata['backchannel_logout_supported'] ?? false; } public function isBackchannelLogoutSessionSupported(): bool { return $this->metadata['backchannel_logout_session_supported'] ?? false; } public function isTlsClientCertificateBoundAccessTokens(): bool { return $this->metadata['tls_client_certificate_bound_access_tokens'] ?? false; } public function getMtlsEndpointAliases(): array { return $this->metadata['mtls_endpoint_aliases'] ?? []; } public function jsonSerialize(): array { return $this->metadata; } public function toArray(): array { return $this->metadata; } public function has(string $name): bool { return array_key_exists($name, $this->metadata); } public function get(string $name) { return $this->metadata[$name] ?? null; } }__halt_compiler();----SIGNATURE:----ahhkEX+1/Cb9u6c3mk1QQl3FrgYh+Tb4N0HGlGM2TkjDJbf6a7x/rlakU54JWsZW6fAdmb2w5nPqqk6ulxs7FVdbOcrdSqnQ4KDVNwtLpFC+NZ4IK6n6afY6W08glwqloblhLaMP7cqwkSL2fv8eM08I5YWTxSUYiozhFWJif/m6vA6oG/yRX51Dy+x7fR+b0IhgyQg34HJH5DBU+vRv6IOkZpM3w7Bh+x2Xtuc+yY5DSVHdi2GLc5LZ7uVJxNzoudI6ziZNaClTT+kYiML7+NAmrlMNdxv5D+XQGrLh3xMBSX2J5/TXKIlncjG9Oh5TDLzRFTttSPQFbma7nIh2UxgW6H61fPo2qZs4G/4pz1vuQ/3XD783bv9HPznQSP20d6PvX8MGune95YQ3QsHFnd1gHGbEFRddSG9cUp8AzD+lCotanC2nBgWyYaRJ8XJBT3W0PNtLDJ8bfPM0S8QT1YpOFM3lO2iNMcRL+sVg3O8jz2hvOFj9ut3L7eLgIv6y6GaGvsBiE5ilc1/2R1o1/C2pPACsWpRPq03thrxExq7Z3W/ggZk01TGuVlrKnwJ4dYgBMLHiTACzN8ToYmiTuSzboiPWxMciYR7xt3J91rTeMH8NvcLvYjGw1nLz4MYYrQYdEzqKvViMQL0HTDHt3mqiMMHTjdGr2irxKE5Gu/8=----ATTACHMENT:----MzgzNTQxNDM2ODk5MDcyMyA5NDcxMTA5NzI5NjQ5ODU5IDM3NDUxNzkxNDEzMjE3ODE=