Class AuthorizationServerMetadata
java.lang.Object
com.revetsec.oauth.AuthorizationServerMetadata
Known authorization-server metadata. A remote document's issuer must match the configured issuer exactly. A
manual instance is application configuration, not proof from a remote server. The
OAuthClient builder
checks every known requestable endpoint against its outbound URI policy before use.- Since:
- 1.0.0
- Author:
- Mark Allen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds manually configured metadata. -
Method Summary
Modifier and TypeMethodDescriptionfromJsonResult(@NonNull String expectedIssuer, @NonNull String json) Parses bounded metadata and reports a fixed document or issuer rejection as a value.Returns the authorization endpoint.Returns advertised PKCE methods, or empty when the metadata field was absent.Returns the optional introspection_endpoint.Returns introspection endpoint methods separately from token endpoint methods.Returns the optional introspection_endpoint_auth_signing_alg_values_supported role policy, retaining absent versus empty and unknown names.Returns the exact issuer identifier.Returns the optional jwks_uri.Returns the revocation endpoint, when one was advertised or configured.Returns the optional revocation_endpoint_auth_methods_supported role policy, retaining absent versus empty and unknown names.Returns the optional revocation_endpoint_auth_signing_alg_values_supported role policy, retaining absent versus empty and unknown names.Returns the token endpoint.Returns advertised token endpoint client authentication methods, or empty when absent.Returns the optional token_endpoint_auth_signing_alg_values_supported role policy, retaining absent versus empty and unknown names.Returns whether metadata advertised RFC 9207 issuer response support.Returns whether this instance came from a checked remote metadata document.withIssuer(@NonNull String issuer) Starts a manual metadata builder for an AS without discovery.
-
Method Details
-
withIssuer
Starts a manual metadata builder for an AS without discovery.- Parameters:
issuer- the deployment's exact issuer identifier- Returns:
- the builder
- Since:
- 1.0.0
-
fromJsonResult
@CheckReturnValue public static @NonNull AuthorizationServerMetadataParseResult fromJsonResult(@NonNull String expectedIssuer, @NonNull String json) Parses bounded metadata and reports a fixed document or issuer rejection as a value.- Parameters:
expectedIssuer- configured trust issuerjson- metadata JSON text- Returns:
- the metadata parsing outcome
- Throws:
NullPointerException- if an argument is null- Since:
- 1.0.0
-
getIssuer
-
getAuthorizationEndpoint
Returns the authorization endpoint.- Returns:
- endpoint
- Since:
- 1.0.0
-
getTokenEndpoint
-
getJwksUri
Returns the optional jwks_uri.- Returns:
- endpoint when configured or advertised
- Since:
- 1.0.0
-
getIntrospectionEndpoint
Returns the optional introspection_endpoint.- Returns:
- endpoint when configured or advertised
- Since:
- 1.0.0
-
getRevocationEndpoint
Returns the revocation endpoint, when one was advertised or configured.- Returns:
- endpoint
- Since:
- 1.0.0
-
getCodeChallengeMethodsSupported
-
getTokenEndpointAuthMethodsSupported
-
getIntrospectionEndpointAuthMethodsSupported
-
getTokenEndpointAuthSigningAlgValuesSupported
public @NonNull Optional<@NonNull Set<@NonNull String>> getTokenEndpointAuthSigningAlgValuesSupported()Returns the optional token_endpoint_auth_signing_alg_values_supported role policy, retaining absent versus empty and unknown names.- Returns:
- advertised or configured names when present
- Since:
- 1.0.0
-
getRevocationEndpointAuthMethodsSupported
-
getRevocationEndpointAuthSigningAlgValuesSupported
public @NonNull Optional<@NonNull Set<@NonNull String>> getRevocationEndpointAuthSigningAlgValuesSupported()Returns the optional revocation_endpoint_auth_signing_alg_values_supported role policy, retaining absent versus empty and unknown names.- Returns:
- advertised or configured names when present
- Since:
- 1.0.0
-
getIntrospectionEndpointAuthSigningAlgValuesSupported
public @NonNull Optional<@NonNull Set<@NonNull String>> getIntrospectionEndpointAuthSigningAlgValuesSupported()Returns the optional introspection_endpoint_auth_signing_alg_values_supported role policy, retaining absent versus empty and unknown names.- Returns:
- advertised or configured names when present
- Since:
- 1.0.0
-
isAuthorizationResponseIssuerSupported
Returns whether metadata advertised RFC 9207 issuer response support.- Returns:
- whether support was advertised
- Since:
- 1.0.0
-
isRemotelyDiscovered
Returns whether this instance came from a checked remote metadata document.- Returns:
- whether discovered
- Since:
- 1.0.0
-