Class OidcProviderMetadata
java.lang.Object
com.revetsec.oidc.OidcProviderMetadata
OpenID provider metadata (OpenID Connect Discovery 1.0 section 3), from discovery or explicit configuration. It is
not authenticated identity. The client validates every known requestable URI against its outbound policy.
- Since:
- 1.0.0
- Author:
- Mark Allen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classMutable explicit provider configuration. -
Method Summary
Modifier and TypeMethodDescriptionfromJsonResult(@NonNull String expectedIssuer, @NonNull String json) Parses a strict, bounded discovery document and compares the issuer exactly.fromJsonResult(@NonNull String expectedIssuer, @NonNull String json, @NonNull OidcIssuerPolicy issuerPolicy) Parses bounded metadata using the configured issuer policy and reports document rejection as a value.Returns the exact issuer string advertised by parsed metadata, or the configured issuer for explicit metadata.Returns the authorization endpoint.Returns the provider's optional RP-Initiated Logout endpoint.Returns the advertised ID-token algorithm names.Returns the optional introspection_endpoint_auth_methods_supported role policy without enabling unknown names.Returns the optional introspection_endpoint_auth_signing_alg_values_supported role policy without enabling unknown names.Returns the exact issuer.Returns the signing-key URI.Returns the advertised response types.Returns the optional revocation_endpoint_auth_methods_supported role policy without enabling unknown names.Returns the optional revocation_endpoint_auth_signing_alg_values_supported role policy without enabling unknown names.Returns the subject types.Returns the token endpoint.Returns the optional token_endpoint_auth_signing_alg_values_supported role policy without enabling unknown names.Returns the optional UserInfo endpoint.Returns advertised signed-UserInfo algorithm names, or empty when absent.toString()Redacts provider configuration.withIssuer(@NonNull String issuer) Starts explicit provider configuration for an exact issuer.
-
Method Details
-
fromJsonResult
public static @NonNull OidcProviderMetadataParseResult fromJsonResult(@NonNull String expectedIssuer, @NonNull String json) Parses a strict, bounded discovery document and compares the issuer exactly. Required OIDC fields must be present; explicit configuration defaults are never applied to a remote document. Unknown members and future algorithm names do not enlarge a client's allowlist. Discovery must advertise RS256 (Discovery section 3). The client separately checks every requestable URI.- Parameters:
expectedIssuer- exact configured issuerjson- metadata JSON text- Returns:
- checked provider metadata, not authenticated identity
- Since:
- 1.0.0
-
fromJsonResult
@CheckReturnValue public static @NonNull OidcProviderMetadataParseResult fromJsonResult(@NonNull String expectedIssuer, @NonNull String json, @NonNull OidcIssuerPolicy issuerPolicy) Parses bounded metadata using the configured issuer policy and reports document rejection as a value.- Parameters:
expectedIssuer- configured trust issuerjson- metadata JSON textissuerPolicy- selected issuer policy- Returns:
- the metadata parsing outcome
- Throws:
NullPointerException- if an argument is null- Since:
- 1.0.0
-
withIssuer
Starts explicit provider configuration for an exact issuer.- Parameters:
issuer- exact issuer identifier- Returns:
- the builder
- Since:
- 1.0.0
-
getTokenEndpointAuthSigningAlgValuesSupported
-
getRevocationEndpointAuthMethodsSupported
-
getRevocationEndpointAuthSigningAlgValuesSupported
-
getIntrospectionEndpointAuthSigningAlgValuesSupported
public @NonNull Optional<@NonNull Set<@NonNull String>> getIntrospectionEndpointAuthSigningAlgValuesSupported()Returns the optional introspection_endpoint_auth_signing_alg_values_supported role policy without enabling unknown names.- Returns:
- names when present, retaining empty versus absent
- Since:
- 1.0.0
-
getIntrospectionEndpointAuthMethodsSupported
-
getIssuer
-
getAdvertisedIssuer
Returns the exact issuer string advertised by parsed metadata, or the configured issuer for explicit metadata.- Returns:
- advertised issuer, possibly the selected Entra template
- Since:
- 1.0.0
-
getAuthorizationEndpoint
Returns the authorization endpoint.- Returns:
- authorization endpoint
- Since:
- 1.0.0
-
getTokenEndpoint
Returns the token endpoint.- Returns:
- token endpoint
- Since:
- 1.0.0
-
getJwksUri
-
getUserInfoEndpoint
Returns the optional UserInfo endpoint.- Returns:
- optional UserInfo endpoint
- Since:
- 1.0.0
-
getEndSessionEndpoint
Returns the provider's optional RP-Initiated Logout endpoint. A client must apply its configured URI policy before handing a logout request to a browser; this metadata accessor performs no request or logout.- Returns:
- the advertised or explicitly configured logout endpoint, when present
- Since:
- 1.0.0
-
getSubjectTypesSupported
Returns the subject types.- Returns:
- subject types
- Since:
- 1.0.0
-
getIdTokenSigningAlgValuesSupported
Returns the advertised ID-token algorithm names.- Returns:
- advertised ID-token algorithm names
- Since:
- 1.0.0
-
getResponseTypesSupported
Returns the advertised response types.- Returns:
- advertised response types
- Since:
- 1.0.0
-
getUserInfoSigningAlgValuesSupported
Returns advertised signed-UserInfo algorithm names, or empty when absent. The client's registered algorithm must occur in this set when the provider advertises it.- Returns:
- supported algorithm names when advertised
- Since:
- 1.0.0
-
toString
-