Package com.nimbusds.oauth2.sdk.as
Class AuthorizationServerMetadata
- java.lang.Object
-
- com.nimbusds.oauth2.sdk.as.AuthorizationServerEndpointMetadata
-
- com.nimbusds.oauth2.sdk.as.AuthorizationServerMetadata
-
- Direct Known Subclasses:
OIDCProviderMetadata
public class AuthorizationServerMetadata extends AuthorizationServerEndpointMetadata
OAuth 2.0 Authorisation Server (AS) metadata.Related specifications:
- OAuth 2.0 Authorization Server Metadata (RFC 8414)
- OAuth 2.0 Mutual TLS Client Authentication and Certificate Bound Access Tokens (draft-ietf-oauth-mtls-15)
- Financial-grade API: JWT Secured Authorization Response Mode for OAuth 2.0 (JARM)
- Financial-grade API - Part 2: Read and Write API Security Profile
- OAuth 2.0 Pushed Authorization Requests (draft-lodderstedt-oauth-par-01)
- OAuth 2.0 Device Flow for Browserless and Input Constrained Devices (draft-ietf-oauth-device-flow-14)
-
-
Constructor Summary
Constructors Constructor Description AuthorizationServerMetadata(Issuer issuer)Creates a new OAuth 2.0 Authorisation Server (AS) metadata instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidapplyDefaults()Applies the OAuth 2.0 Authorisation Server metadata defaults where no values have been specified.List<com.nimbusds.jose.JWEAlgorithm>getAuthorizationJWEAlgs()Gets the supported JWE algorithms for JWT-encoded authorisation responses.List<com.nimbusds.jose.EncryptionMethod>getAuthorizationJWEEncs()Gets the supported encryption methods for JWT-encoded authorisation responses.List<com.nimbusds.jose.JWSAlgorithm>getAuthorizationJWSAlgs()Gets the supported JWS algorithms for JWT-encoded authorisation responses.List<CodeChallengeMethod>getCodeChallengeMethods()Gets the supported authorisation code challenge methods for PKCE.ObjectgetCustomParameter(String name)Gets the specified custom (not registered) parameter.net.minidev.json.JSONObjectgetCustomParameters()Gets the custom (not registered) parameters.URIgetCustomURIParameter(String name)Gets the specified custom (not registered) URI parameter.List<GrantType>getGrantTypes()Gets the supported OAuth 2.0 grant types.List<ClientAuthenticationMethod>getIntrospectionEndpointAuthMethods()Gets the supported introspection endpoint authentication methods.List<com.nimbusds.jose.JWSAlgorithm>getIntrospectionEndpointJWSAlgs()Gets the supported JWS algorithms for theprivate_key_jwtandclient_secret_jwtintrospection endpoint authentication methods.IssuergetIssuer()Gets the issuer identifier.URIgetJWKSetURI()Gets the JSON Web Key (JWK) set URI.AuthorizationServerEndpointMetadatagetMtlsEndpointAliases()Gets the aliases for communication with mutual TLS.URIgetPolicyURI()Gets the provider's policy regarding relying party use of data.static Set<String>getRegisteredParameterNames()Gets the registered OpenID Connect provider metadata parameter names.List<com.nimbusds.jose.JWEAlgorithm>getRequestObjectJWEAlgs()Gets the supported JWE algorithms for request objects.List<com.nimbusds.jose.EncryptionMethod>getRequestObjectJWEEncs()Gets the supported encryption methods for request objects.List<com.nimbusds.jose.JWSAlgorithm>getRequestObjectJWSAlgs()Gets the supported JWS algorithms for request objects.List<ResponseMode>getResponseModes()Gets the supported response mode values.List<ResponseType>getResponseTypes()Gets the supported response type values.List<ClientAuthenticationMethod>getRevocationEndpointAuthMethods()Gets the supported revocation endpoint authentication methods.List<com.nimbusds.jose.JWSAlgorithm>getRevocationEndpointJWSAlgs()Gets the supported JWS algorithms for theprivate_key_jwtandclient_secret_jwtrevocation endpoint authentication methods.ScopegetScopes()Gets the supported scope values.URIgetServiceDocsURI()Gets the service documentation URI.URIgetTermsOfServiceURI()Gets the provider's terms of service.List<ClientAuthenticationMethod>getTokenEndpointAuthMethods()Gets the supported token endpoint authentication methods.List<com.nimbusds.jose.JWSAlgorithm>getTokenEndpointJWSAlgs()Gets the supported JWS algorithms for theprivate_key_jwtandclient_secret_jwttoken endpoint authentication methods.List<com.nimbusds.langtag.LangTag>getUILocales()Gets the supported UI locales.static AuthorizationServerMetadataparse(String s)Parses an OAuth 2.0 Authorisation Server metadata from the specified JSON object string.static AuthorizationServerMetadataparse(net.minidev.json.JSONObject jsonObject)Parses an OAuth 2.0 Authorisation Server metadata from the specified JSON object.booleanrequiresRequestURIRegistration()Gets the requirement for therequest_uriparameter pre-registration.static AuthorizationServerMetadataresolve(Issuer issuer)Resolves OAuth 2.0 authorisation server metadata from the specified issuer identifier.static AuthorizationServerMetadataresolve(Issuer issuer, int connectTimeout, int readTimeout)Resolves OAuth 2.0 authorisation server metadata from the specified issuer identifier.static URLresolveURL(Issuer issuer)Resolves OAuth 2.0 authorisation server metadata URL from the specified issuer identifier.voidsetAuthorizationJWEAlgs(List<com.nimbusds.jose.JWEAlgorithm> authzJWEAlgs)Sets the supported JWE algorithms for JWT-encoded authorisation responses.voidsetAuthorizationJWEEncs(List<com.nimbusds.jose.EncryptionMethod> authzJWEEncs)Sets the supported encryption methods for JWT-encoded authorisation responses.voidsetAuthorizationJWSAlgs(List<com.nimbusds.jose.JWSAlgorithm> authzJWSAlgs)Sets the supported JWS algorithms for JWT-encoded authorisation responses.voidsetCodeChallengeMethods(List<CodeChallengeMethod> codeChallengeMethods)Gets the supported authorisation code challenge methods for PKCE.voidsetCustomParameter(String name, Object value)Sets the specified custom (not registered) parameter.voidsetGrantTypes(List<GrantType> gts)Sets the supported OAuth 2.0 grant types.voidsetIntrospectionEndpointAuthMethods(List<ClientAuthenticationMethod> authMethods)Sets the supported introspection endpoint authentication methods.voidsetIntrospectionEndpointJWSAlgs(List<com.nimbusds.jose.JWSAlgorithm> jwsAlgs)Sets the supported JWS algorithms for theprivate_key_jwtandclient_secret_jwtintrospection endpoint authentication methods.voidsetJWKSetURI(URI jwkSetURI)Sets the JSON Web Key (JWT) set URI.voidsetMtlsEndpointAliases(AuthorizationServerEndpointMetadata mtlsEndpointAliases)Sets the aliases for communication with mutual TLS.voidsetPolicyURI(URI policyURI)Sets the provider's policy regarding relying party use of data.voidsetRequestObjectJWEAlgs(List<com.nimbusds.jose.JWEAlgorithm> requestObjectJWEAlgs)Sets the supported JWE algorithms for request objects.voidsetRequestObjectJWEEncs(List<com.nimbusds.jose.EncryptionMethod> requestObjectJWEEncs)Sets the supported encryption methods for request objects.voidsetRequestObjectJWSAlgs(List<com.nimbusds.jose.JWSAlgorithm> requestObjectJWSAlgs)Sets the supported JWS algorithms for request objects.voidsetRequiresRequestURIRegistration(boolean requireRequestURIReg)Sets the requirement for therequest_uriparameter pre-registration.voidsetResponseModes(List<ResponseMode> rms)Sets the supported response mode values.voidsetResponseTypes(List<ResponseType> rts)Sets the supported response type values.voidsetRevocationEndpointAuthMethods(List<ClientAuthenticationMethod> authMethods)Sets the supported revocation endpoint authentication methods.voidsetRevocationEndpointJWSAlgs(List<com.nimbusds.jose.JWSAlgorithm> jwsAlgs)Sets the supported JWS algorithms for theprivate_key_jwtandclient_secret_jwtrevocation endpoint authentication methods.voidsetScopes(Scope scope)Sets the supported scope values.voidsetServiceDocsURI(URI serviceDocsURI)Sets the service documentation URI.voidsetSupportsMutualTLSSenderConstrainedAccessTokens(boolean mutualTLSSenderConstrainedAccessTokens)Deprecated.voidsetSupportsRequestParam(boolean requestParamSupported)Sets the support for therequestauthorisation request parameter.voidsetSupportsRequestURIParam(boolean requestURIParamSupported)Sets the support for therequest_uriauthorisation request parameter.voidsetSupportsTLSClientCertificateBoundAccessTokens(boolean tlsClientCertBoundTokens)Sets the support for TLS client certificate bound access tokens.voidsetTermsOfServiceURI(URI tosURI)Sets the provider's terms of service.voidsetTokenEndpointAuthMethods(List<ClientAuthenticationMethod> authMethods)Sets the supported token endpoint authentication methods.voidsetTokenEndpointJWSAlgs(List<com.nimbusds.jose.JWSAlgorithm> jwsAlgs)Sets the supported JWS algorithms for theprivate_key_jwtandclient_secret_jwttoken endpoint authentication methods.voidsetUILocales(List<com.nimbusds.langtag.LangTag> uiLocales)Sets the supported UI locales.booleansupportsMutualTLSSenderConstrainedAccessTokens()Deprecated.booleansupportsRequestParam()Gets the support for therequestauthorisation request parameter.booleansupportsRequestURIParam()Gets the support for therequest_uriauthorisation request parameter.booleansupportsTLSClientCertificateBoundAccessTokens()Gets the support for TLS client certificate bound access tokens.net.minidev.json.JSONObjecttoJSONObject()Returns the JSON object representation of this OpenID Connect provider metadata.-
Methods inherited from class com.nimbusds.oauth2.sdk.as.AuthorizationServerEndpointMetadata
getAuthorizationEndpointURI, getDeviceAuthorizationEndpointURI, getIntrospectionEndpointURI, getPushedAuthorizationRequestEndpointURI, getRegistrationEndpointURI, getRequestObjectEndpoint, getRevocationEndpointURI, getTokenEndpointURI, setAuthorizationEndpointURI, setDeviceAuthorizationEndpointURI, setIntrospectionEndpointURI, setPushedAuthorizationRequestEndpointURI, setRegistrationEndpointURI, setRequestObjectEndpoint, setRevocationEndpointURI, setTokenEndpointURI, toString
-
-
-
-
Constructor Detail
-
AuthorizationServerMetadata
public AuthorizationServerMetadata(Issuer issuer)
Creates a new OAuth 2.0 Authorisation Server (AS) metadata instance.- Parameters:
issuer- The issuer identifier. Must be an URI using the https scheme with no query or fragment component. Must not benull.
-
-
Method Detail
-
getRegisteredParameterNames
public static Set<String> getRegisteredParameterNames()
Gets the registered OpenID Connect provider metadata parameter names.- Returns:
- The registered OpenID Connect provider metadata parameter names, as an unmodifiable set.
-
getIssuer
public Issuer getIssuer()
Gets the issuer identifier. Corresponds to theissuermetadata field.- Returns:
- The issuer identifier.
-
getJWKSetURI
public URI getJWKSetURI()
Gets the JSON Web Key (JWK) set URI. Corresponds to thejwks_urimetadata field.- Returns:
- The JWK set URI,
nullif not specified.
-
setJWKSetURI
public void setJWKSetURI(URI jwkSetURI)
Sets the JSON Web Key (JWT) set URI. Corresponds to thejwks_urimetadata field.- Parameters:
jwkSetURI- The JWK set URI,nullif not specified.
-
getScopes
public Scope getScopes()
Gets the supported scope values. Corresponds to thescopes_supportedmetadata field.- Returns:
- The supported scope values,
nullif not specified.
-
setScopes
public void setScopes(Scope scope)
Sets the supported scope values. Corresponds to thescopes_supportedmetadata field.- Parameters:
scope- The supported scope values,nullif not specified.
-
getResponseTypes
public List<ResponseType> getResponseTypes()
Gets the supported response type values. Corresponds to theresponse_types_supportedmetadata field.- Returns:
- The supported response type values,
nullif not specified.
-
setResponseTypes
public void setResponseTypes(List<ResponseType> rts)
Sets the supported response type values. Corresponds to theresponse_types_supportedmetadata field.- Parameters:
rts- The supported response type values,nullif not specified.
-
getResponseModes
public List<ResponseMode> getResponseModes()
Gets the supported response mode values. Corresponds to theresponse_modes_supported.- Returns:
- The supported response mode values,
nullif not specified.
-
setResponseModes
public void setResponseModes(List<ResponseMode> rms)
Sets the supported response mode values. Corresponds to theresponse_modes_supported.- Parameters:
rms- The supported response mode values,nullif not specified.
-
getGrantTypes
public List<GrantType> getGrantTypes()
Gets the supported OAuth 2.0 grant types. Corresponds to thegrant_types_supportedmetadata field.- Returns:
- The supported grant types,
nullif not specified.
-
setGrantTypes
public void setGrantTypes(List<GrantType> gts)
Sets the supported OAuth 2.0 grant types. Corresponds to thegrant_types_supportedmetadata field.- Parameters:
gts- The supported grant types,nullif not specified.
-
getCodeChallengeMethods
public List<CodeChallengeMethod> getCodeChallengeMethods()
Gets the supported authorisation code challenge methods for PKCE. Corresponds to thecode_challenge_methods_supportedmetadata field.- Returns:
- The supported code challenge methods,
nullif not specified.
-
setCodeChallengeMethods
public void setCodeChallengeMethods(List<CodeChallengeMethod> codeChallengeMethods)
Gets the supported authorisation code challenge methods for PKCE. Corresponds to thecode_challenge_methods_supportedmetadata field.- Parameters:
codeChallengeMethods- The supported code challenge methods,nullif not specified.
-
getTokenEndpointAuthMethods
public List<ClientAuthenticationMethod> getTokenEndpointAuthMethods()
Gets the supported token endpoint authentication methods. Corresponds to thetoken_endpoint_auth_methods_supportedmetadata field.- Returns:
- The supported token endpoint authentication methods,
nullif not specified.
-
setTokenEndpointAuthMethods
public void setTokenEndpointAuthMethods(List<ClientAuthenticationMethod> authMethods)
Sets the supported token endpoint authentication methods. Corresponds to thetoken_endpoint_auth_methods_supportedmetadata field.- Parameters:
authMethods- The supported token endpoint authentication methods,nullif not specified.
-
getTokenEndpointJWSAlgs
public List<com.nimbusds.jose.JWSAlgorithm> getTokenEndpointJWSAlgs()
Gets the supported JWS algorithms for theprivate_key_jwtandclient_secret_jwttoken endpoint authentication methods. Corresponds to thetoken_endpoint_auth_signing_alg_values_supportedmetadata field.- Returns:
- The supported JWS algorithms,
nullif not specified.
-
setTokenEndpointJWSAlgs
public void setTokenEndpointJWSAlgs(List<com.nimbusds.jose.JWSAlgorithm> jwsAlgs)
Sets the supported JWS algorithms for theprivate_key_jwtandclient_secret_jwttoken endpoint authentication methods. Corresponds to thetoken_endpoint_auth_signing_alg_values_supportedmetadata field.- Parameters:
jwsAlgs- The supported JWS algorithms,nullif not specified. Must not contain thenonealgorithm.
-
getIntrospectionEndpointAuthMethods
public List<ClientAuthenticationMethod> getIntrospectionEndpointAuthMethods()
Gets the supported introspection endpoint authentication methods. Corresponds to theintrospection_endpoint_auth_methods_supportedmetadata field.- Returns:
- The supported introspection endpoint authentication methods,
nullif not specified.
-
setIntrospectionEndpointAuthMethods
public void setIntrospectionEndpointAuthMethods(List<ClientAuthenticationMethod> authMethods)
Sets the supported introspection endpoint authentication methods. Corresponds to theintrospection_endpoint_auth_methods_supportedmetadata field.- Parameters:
authMethods- The supported introspection endpoint authentication methods,nullif not specified.
-
getIntrospectionEndpointJWSAlgs
public List<com.nimbusds.jose.JWSAlgorithm> getIntrospectionEndpointJWSAlgs()
Gets the supported JWS algorithms for theprivate_key_jwtandclient_secret_jwtintrospection endpoint authentication methods. Corresponds to theintrospection_endpoint_auth_signing_alg_values_supportedmetadata field.- Returns:
- The supported JWS algorithms,
nullif not specified.
-
setIntrospectionEndpointJWSAlgs
public void setIntrospectionEndpointJWSAlgs(List<com.nimbusds.jose.JWSAlgorithm> jwsAlgs)
Sets the supported JWS algorithms for theprivate_key_jwtandclient_secret_jwtintrospection endpoint authentication methods. Corresponds to theintrospection_endpoint_auth_signing_alg_values_supportedmetadata field.- Parameters:
jwsAlgs- The supported JWS algorithms,nullif not specified. Must not contain thenonealgorithm.
-
getRevocationEndpointAuthMethods
public List<ClientAuthenticationMethod> getRevocationEndpointAuthMethods()
Gets the supported revocation endpoint authentication methods. Corresponds to therevocation_endpoint_auth_methods_supportedmetadata field.- Returns:
- The supported revocation endpoint authentication methods,
nullif not specified.
-
setRevocationEndpointAuthMethods
public void setRevocationEndpointAuthMethods(List<ClientAuthenticationMethod> authMethods)
Sets the supported revocation endpoint authentication methods. Corresponds to therevocation_endpoint_auth_methods_supportedmetadata field.- Parameters:
authMethods- The supported revocation endpoint authentication methods,nullif not specified.
-
getRevocationEndpointJWSAlgs
public List<com.nimbusds.jose.JWSAlgorithm> getRevocationEndpointJWSAlgs()
Gets the supported JWS algorithms for theprivate_key_jwtandclient_secret_jwtrevocation endpoint authentication methods. Corresponds to therevocation_endpoint_auth_signing_alg_values_supportedmetadata field.- Returns:
- The supported JWS algorithms,
nullif not specified.
-
setRevocationEndpointJWSAlgs
public void setRevocationEndpointJWSAlgs(List<com.nimbusds.jose.JWSAlgorithm> jwsAlgs)
Sets the supported JWS algorithms for theprivate_key_jwtandclient_secret_jwtrevocation endpoint authentication methods. Corresponds to therevocation_endpoint_auth_signing_alg_values_supportedmetadata field.- Parameters:
jwsAlgs- The supported JWS algorithms,nullif not specified. Must not contain thenonealgorithm.
-
getRequestObjectJWSAlgs
public List<com.nimbusds.jose.JWSAlgorithm> getRequestObjectJWSAlgs()
Gets the supported JWS algorithms for request objects. Corresponds to therequest_object_signing_alg_values_supportedmetadata field.- Returns:
- The supported JWS algorithms,
nullif not specified.
-
setRequestObjectJWSAlgs
public void setRequestObjectJWSAlgs(List<com.nimbusds.jose.JWSAlgorithm> requestObjectJWSAlgs)
Sets the supported JWS algorithms for request objects. Corresponds to therequest_object_signing_alg_values_supportedmetadata field.- Parameters:
requestObjectJWSAlgs- The supported JWS algorithms,nullif not specified.
-
getRequestObjectJWEAlgs
public List<com.nimbusds.jose.JWEAlgorithm> getRequestObjectJWEAlgs()
Gets the supported JWE algorithms for request objects. Corresponds to therequest_object_encryption_alg_values_supportedmetadata field.- Returns:
- The supported JWE algorithms,
nullif not specified.
-
setRequestObjectJWEAlgs
public void setRequestObjectJWEAlgs(List<com.nimbusds.jose.JWEAlgorithm> requestObjectJWEAlgs)
Sets the supported JWE algorithms for request objects. Corresponds to therequest_object_encryption_alg_values_supportedmetadata field.- Parameters:
requestObjectJWEAlgs- The supported JWE algorithms,nullif not specified.
-
getRequestObjectJWEEncs
public List<com.nimbusds.jose.EncryptionMethod> getRequestObjectJWEEncs()
Gets the supported encryption methods for request objects. Corresponds to therequest_object_encryption_enc_values_supportedmetadata field.- Returns:
- The supported encryption methods,
nullif not specified.
-
setRequestObjectJWEEncs
public void setRequestObjectJWEEncs(List<com.nimbusds.jose.EncryptionMethod> requestObjectJWEEncs)
Sets the supported encryption methods for request objects. Corresponds to therequest_object_encryption_enc_values_supportedmetadata field.- Parameters:
requestObjectJWEEncs- The supported encryption methods,nullif not specified.
-
supportsRequestParam
public boolean supportsRequestParam()
Gets the support for therequestauthorisation request parameter. Corresponds to therequest_parameter_supportedmetadata field.- Returns:
trueif thereqeustparameter is supported, elsefalse.
-
setSupportsRequestParam
public void setSupportsRequestParam(boolean requestParamSupported)
Sets the support for therequestauthorisation request parameter. Corresponds to therequest_parameter_supportedmetadata field.- Parameters:
requestParamSupported-trueif thereqeustparameter is supported, elsefalse.
-
supportsRequestURIParam
public boolean supportsRequestURIParam()
Gets the support for therequest_uriauthorisation request parameter. Corresponds therequest_uri_parameter_supportedmetadata field.- Returns:
trueif therequest_uriparameter is supported, elsefalse.
-
setSupportsRequestURIParam
public void setSupportsRequestURIParam(boolean requestURIParamSupported)
Sets the support for therequest_uriauthorisation request parameter. Corresponds therequest_uri_parameter_supportedmetadata field.- Parameters:
requestURIParamSupported-trueif therequest_uriparameter is supported, elsefalse.
-
requiresRequestURIRegistration
public boolean requiresRequestURIRegistration()
Gets the requirement for therequest_uriparameter pre-registration. Corresponds to therequire_request_uri_registrationmetadata field.- Returns:
trueif therequest_uriparameter values must be pre-registered, elsefalse.
-
setRequiresRequestURIRegistration
public void setRequiresRequestURIRegistration(boolean requireRequestURIReg)
Sets the requirement for therequest_uriparameter pre-registration. Corresponds to therequire_request_uri_registrationmetadata field.- Parameters:
requireRequestURIReg-trueif therequest_uriparameter values must be pre-registered, elsefalse.
-
getUILocales
public List<com.nimbusds.langtag.LangTag> getUILocales()
Gets the supported UI locales. Corresponds to theui_locales_supportedmetadata field.- Returns:
- The supported UI locales,
nullif not specified.
-
setUILocales
public void setUILocales(List<com.nimbusds.langtag.LangTag> uiLocales)
Sets the supported UI locales. Corresponds to theui_locales_supportedmetadata field.- Parameters:
uiLocales- The supported UI locales,nullif not specified.
-
getServiceDocsURI
public URI getServiceDocsURI()
Gets the service documentation URI. Corresponds to theservice_documentationmetadata field.- Returns:
- The service documentation URI,
nullif not specified.
-
setServiceDocsURI
public void setServiceDocsURI(URI serviceDocsURI)
Sets the service documentation URI. Corresponds to theservice_documentationmetadata field.- Parameters:
serviceDocsURI- The service documentation URI,nullif not specified.
-
getPolicyURI
public URI getPolicyURI()
Gets the provider's policy regarding relying party use of data. Corresponds to theop_policy_urimetadata field.- Returns:
- The policy URI,
nullif not specified.
-
setPolicyURI
public void setPolicyURI(URI policyURI)
Sets the provider's policy regarding relying party use of data. Corresponds to theop_policy_urimetadata field.- Parameters:
policyURI- The policy URI,nullif not specified.
-
getTermsOfServiceURI
public URI getTermsOfServiceURI()
Gets the provider's terms of service. Corresponds to theop_tos_urimetadata field.- Returns:
- The terms of service URI,
nullif not specified.
-
setTermsOfServiceURI
public void setTermsOfServiceURI(URI tosURI)
Sets the provider's terms of service. Corresponds to theop_tos_urimetadata field.- Parameters:
tosURI- The terms of service URI,nullif not specified.
-
getMtlsEndpointAliases
public AuthorizationServerEndpointMetadata getMtlsEndpointAliases()
Gets the aliases for communication with mutual TLS. Corresponds to themtls_endpoint_aliasesmetadata field.- Returns:
- The aliases for communication with mutual TLS, or
nullwhen no aliases are defined.
-
setMtlsEndpointAliases
public void setMtlsEndpointAliases(AuthorizationServerEndpointMetadata mtlsEndpointAliases)
Sets the aliases for communication with mutual TLS. Corresponds to themtls_endpoint_aliasesmetadata field.- Parameters:
mtlsEndpointAliases- The aliases for communication with mutual TLS, ornullwhen no aliases are defined.
-
supportsTLSClientCertificateBoundAccessTokens
public boolean supportsTLSClientCertificateBoundAccessTokens()
Gets the support for TLS client certificate bound access tokens. Corresponds to thetls_client_certificate_bound_access_tokensmetadata field.- Returns:
trueif TLS client certificate bound access tokens are supported, elsefalse.
-
setSupportsTLSClientCertificateBoundAccessTokens
public void setSupportsTLSClientCertificateBoundAccessTokens(boolean tlsClientCertBoundTokens)
Sets the support for TLS client certificate bound access tokens. Corresponds to thetls_client_certificate_bound_access_tokensmetadata field.- Parameters:
tlsClientCertBoundTokens-trueif TLS client certificate bound access tokens are supported, elsefalse.
-
supportsMutualTLSSenderConstrainedAccessTokens
@Deprecated public boolean supportsMutualTLSSenderConstrainedAccessTokens()
Deprecated.Gets the support for TLS client certificate bound access tokens. Corresponds to thetls_client_certificate_bound_access_tokensmetadata field.- Returns:
trueif TLS client certificate bound access tokens are supported, elsefalse.
-
setSupportsMutualTLSSenderConstrainedAccessTokens
@Deprecated public void setSupportsMutualTLSSenderConstrainedAccessTokens(boolean mutualTLSSenderConstrainedAccessTokens)
Deprecated.Sets the support for TLS client certificate bound access tokens. Corresponds to thetls_client_certificate_bound_access_tokensmetadata field.- Parameters:
mutualTLSSenderConstrainedAccessTokens-trueif TLS client certificate bound access tokens are supported, elsefalse.
-
getAuthorizationJWSAlgs
public List<com.nimbusds.jose.JWSAlgorithm> getAuthorizationJWSAlgs()
Gets the supported JWS algorithms for JWT-encoded authorisation responses. Corresponds to theauthorization_signing_alg_values_supportedmetadata field.- Returns:
- The supported JWS algorithms,
nullif not specified.
-
setAuthorizationJWSAlgs
public void setAuthorizationJWSAlgs(List<com.nimbusds.jose.JWSAlgorithm> authzJWSAlgs)
Sets the supported JWS algorithms for JWT-encoded authorisation responses. Corresponds to theauthorization_signing_alg_values_supportedmetadata field.- Parameters:
authzJWSAlgs- The supported JWS algorithms,nullif not specified.
-
getAuthorizationJWEAlgs
public List<com.nimbusds.jose.JWEAlgorithm> getAuthorizationJWEAlgs()
Gets the supported JWE algorithms for JWT-encoded authorisation responses. Corresponds to theauthorization_encryption_alg_values_supportedmetadata field.- Returns:
- The supported JWE algorithms,
nullif not specified.
-
setAuthorizationJWEAlgs
public void setAuthorizationJWEAlgs(List<com.nimbusds.jose.JWEAlgorithm> authzJWEAlgs)
Sets the supported JWE algorithms for JWT-encoded authorisation responses. Corresponds to theauthorization_encryption_alg_values_supportedmetadata field.- Parameters:
authzJWEAlgs- The supported JWE algorithms,nullif not specified.
-
getAuthorizationJWEEncs
public List<com.nimbusds.jose.EncryptionMethod> getAuthorizationJWEEncs()
Gets the supported encryption methods for JWT-encoded authorisation responses. Corresponds to theauthorization_encryption_enc_values_supportedmetadata field.- Returns:
- The supported encryption methods,
nullif not specified.
-
setAuthorizationJWEEncs
public void setAuthorizationJWEEncs(List<com.nimbusds.jose.EncryptionMethod> authzJWEEncs)
Sets the supported encryption methods for JWT-encoded authorisation responses. Corresponds to theauthorization_encryption_enc_values_supportedmetadata field.- Parameters:
authzJWEEncs- The supported encryption methods,nullif not specified.
-
getCustomParameter
public Object getCustomParameter(String name)
Gets the specified custom (not registered) parameter.- Parameters:
name- The parameter name. Must not benull.- Returns:
- The parameter value,
nullif not specified.
-
getCustomURIParameter
public URI getCustomURIParameter(String name)
Gets the specified custom (not registered) URI parameter.- Parameters:
name- The parameter name. Must not benull.- Returns:
- The parameter URI value,
nullif not specified.
-
setCustomParameter
public void setCustomParameter(String name, Object value)
Sets the specified custom (not registered) parameter.- Parameters:
name- The parameter name. Must not benull.value- The parameter value,nullif not specified.
-
getCustomParameters
public net.minidev.json.JSONObject getCustomParameters()
Gets the custom (not registered) parameters.- Returns:
- The custom parameters, empty JSON object if none.
-
applyDefaults
public void applyDefaults()
Applies the OAuth 2.0 Authorisation Server metadata defaults where no values have been specified.- The response modes default to
["query", "fragment"]. - The grant types default to
["authorization_code", "implicit"]. - The token endpoint authentication methods default to
["client_secret_basic"].
- The response modes default to
-
toJSONObject
public net.minidev.json.JSONObject toJSONObject()
Returns the JSON object representation of this OpenID Connect provider metadata.- Overrides:
toJSONObjectin classAuthorizationServerEndpointMetadata- Returns:
- The JSON object representation.
-
parse
public static AuthorizationServerMetadata parse(net.minidev.json.JSONObject jsonObject) throws ParseException
Parses an OAuth 2.0 Authorisation Server metadata from the specified JSON object.- Parameters:
jsonObject- The JSON object to parse. Must not benull.- Returns:
- The OAuth 2.0 Authorisation Server metadata.
- Throws:
ParseException- If the JSON object couldn't be parsed to an OAuth 2.0 Authorisation Server metadata.
-
parse
public static AuthorizationServerMetadata parse(String s) throws ParseException
Parses an OAuth 2.0 Authorisation Server metadata from the specified JSON object string.- Parameters:
s- The JSON object sting to parse. Must not benull.- Returns:
- The OAuth 2.0 Authorisation Server metadata.
- Throws:
ParseException- If the JSON object string couldn't be parsed to an OAuth 2.0 Authorisation Server metadata.
-
resolveURL
public static URL resolveURL(Issuer issuer) throws GeneralException
Resolves OAuth 2.0 authorisation server metadata URL from the specified issuer identifier.- Parameters:
issuer- The issuer identifier. Must represent a valid HTTPS or HTTP URL. Must not benull.- Returns:
- The OAuth 2.0 authorisation server metadata URL.
- Throws:
GeneralException- If the issuer identifier is invalid.
-
resolve
public static AuthorizationServerMetadata resolve(Issuer issuer) throws GeneralException, IOException
Resolves OAuth 2.0 authorisation server metadata from the specified issuer identifier. The metadata is downloaded by HTTP GET from[issuer-url]/.well-known/oauth-authorization-server.- Parameters:
issuer- The issuer identifier. Must represent a valid HTTPS or HTTP URL. Must not benull.- Returns:
- The OAuth 2.0 authorisation server metadata.
- Throws:
GeneralException- If the issuer identifier or the downloaded metadata are invalid.IOException- On a HTTP exception.
-
resolve
public static AuthorizationServerMetadata resolve(Issuer issuer, int connectTimeout, int readTimeout) throws GeneralException, IOException
Resolves OAuth 2.0 authorisation server metadata from the specified issuer identifier. The metadata is downloaded by HTTP GET from[issuer-url]/.well-known/oauth-authorization-server.- Parameters:
issuer- The issuer identifier. Must represent a valid HTTPS or HTTP URL. Must not benull.connectTimeout- The HTTP connect timeout, in milliseconds. Zero implies no timeout. Must not be negative.readTimeout- The HTTP response read timeout, in milliseconds. Zero implies no timeout. Must not be negative.- Returns:
- The OAuth 2.0 authorisation server metadata.
- Throws:
GeneralException- If the issuer identifier or the downloaded metadata are invalid.IOException- On a HTTP exception.
-
-