Class OIDCClientMetadata
java.lang.Object
com.nimbusds.oauth2.sdk.client.ClientMetadata
com.nimbusds.openid.connect.sdk.rp.OIDCClientMetadata
OpenID Connect client metadata.
Related specifications:
- OpenID Connect Dynamic Client Registration 1.0
- OpenID Connect Session Management 1.0
- OpenID Connect Front-Channel Logout 1.0
- OpenID Connect Back-Channel Logout 1.0
- OpenID Connect for Identity Assurance 1.0
- OpenID Federation 1.0
- OAuth 2.0 Dynamic Client Registration Protocol (RFC 7591)
- OAuth 2.0 Mutual TLS Client Authentication and Certificate Bound Access Tokens (RFC 8705)
- OAuth 2.0 Demonstrating Proof of Possession (DPoP) (RFC 9449)
- Financial-grade API: JWT Secured Authorization Response Mode for OAuth 2.0 (JARM)
- OAuth 2.0 Pushed Authorization Requests (RFC 9126)
- OAuth 2.0 Rich Authorization Requests (RFC 9396)
-
Field Summary
Fields inherited from class com.nimbusds.oauth2.sdk.client.ClientMetadata
PROHIBITED_REDIRECT_URI_SCHEMES -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new OpenID Connect client metadata instance.OIDCClientMetadata(ClientMetadata metadata) Creates a new OpenID Connect client metadata instance from the specified base OAuth 2.0 client metadata.OIDCClientMetadata(OIDCClientMetadata metadata) Creates a shallow copy of the specified OpenID Connect client metadata instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidApplies the client metadata defaults where no values have been specified.Gets the client application type.Gets the digest algorithm for the external evidence attachments in OpenID Connect for Identity Assurance 1.0.Gets the back-channel logout URI.Gets the default Authentication Context Class Reference (ACR) values.intGets the default maximum authentication age.Gets the front-channel logout URI.com.nimbusds.jose.JWEAlgorithmGets the JSON Web Encryption (JWE) algorithm required for the ID Tokens issued to this client.com.nimbusds.jose.EncryptionMethodGets the JSON Web Encryption (JWE) method required for the ID Tokens issued to this client.com.nimbusds.jose.JWSAlgorithmGets the JSON Web Signature (JWS) algorithm required for the ID Tokens issued to this client.Gets the HTTPS URI that the authorisation server can call to initiate a login at the client.Gets the post logout redirection URIs.Gets the registered (standard) OpenID Connect client metadata parameter names.Gets the sector identifier URI.Gets the subject identifier type for responses to this client.com.nimbusds.jose.JWEAlgorithmGets the JSON Web Encryption (JWE) algorithm required for the UserInfo responses to this client.com.nimbusds.jose.EncryptionMethodGets the JSON Web Encryption (JWE) method required for the UserInfo responses to this client.com.nimbusds.jose.JWSAlgorithmGets the JSON Web Signature (JWS) algorithm required for the UserInfo responses to this client.static OIDCClientMetadataparse(net.minidev.json.JSONObject jsonObject) Parses an OpenID Connect client metadata instance from the specified JSON object.booleanGets the default requirement for theauth_timeclaim in the ID Token.voidrequiresAuthTime(boolean requiresAuthTime) Sets the default requirement for theauth_timeclaim in the ID Token.booleanGets the requirement for a session identifier on back-channel logout.voidrequiresBackChannelLogoutSession(boolean requiresSession) Sets the requirement for a session identifier on back-channel logout.booleanGets the requirement for a session identifier on front-channel logout.voidrequiresFrontChannelLogoutSession(boolean requiresSession) Sets the requirement for a session identifier on front-channel logout.Resolves the sector identifier from the client metadata.voidsetApplicationType(ApplicationType applicationType) Sets the client application type.voidsetAttachmentDigestAlg(HashAlgorithm hashAlg) Sets the digest algorithm for the external evidence attachments in OpenID Connect for Identity Assurance 1.0.voidsetBackChannelLogoutURI(URI backChannelLogoutURI) Sets the back-channel logout URI.voidsetDefaultACRs(List<ACR> defaultACRs) Sets the default Authentication Context Class Reference (ACR) values.voidsetDefaultMaxAge(int defaultMaxAge) Sets the default maximum authentication age.voidsetFrontChannelLogoutURI(URI frontChannelLogoutURI) Sets the front-channel logout URI.voidsetIDTokenJWEAlg(com.nimbusds.jose.JWEAlgorithm idTokenJWEAlg) Sets the JSON Web Encryption (JWE) algorithm required for the ID Tokens issued to this client.voidsetIDTokenJWEEnc(com.nimbusds.jose.EncryptionMethod idTokenJWEEnc) Sets the JSON Web Encryption (JWE) method required for the ID Tokens issued to this client.voidsetIDTokenJWSAlg(com.nimbusds.jose.JWSAlgorithm idTokenJWSAlg) Sets the JSON Web Signature (JWS) algorithm required for the ID Tokens issued to this client.voidsetInitiateLoginURI(URI loginURI) Sets the HTTPS URI that the authorisation server can call to initiate a login at the client.voidsetPostLogoutRedirectionURIs(Set<URI> logoutURIs) Sets the post logout redirection URIs.voidsetSectorIDURI(URI sectorIDURI) Sets the sector identifier URI.voidsetSubjectType(SubjectType subjectType) Sets the subject identifier type for responses to this client.voidsetUserInfoJWEAlg(com.nimbusds.jose.JWEAlgorithm userInfoJWEAlg) Sets the JSON Web Encryption (JWE) algorithm required for the UserInfo responses to this client.voidsetUserInfoJWEEnc(com.nimbusds.jose.EncryptionMethod userInfoJWEEnc) Sets the JSON Web Encryption (JWE) method required for the UserInfo responses to this client.voidsetUserInfoJWSAlg(com.nimbusds.jose.JWSAlgorithm userInfoJWSAlg) Sets the JSON Web Signature (JWS) algorithm required for the UserInfo responses to this client.net.minidev.json.JSONObjecttoJSONObject(boolean includeCustomFields) Returns the JSON object representation of this client metadata.Methods inherited from class com.nimbusds.oauth2.sdk.client.ClientMetadata
getAuthorizationDetailsTypes, getAuthorizationJWEAlg, getAuthorizationJWEEnc, getAuthorizationJWSAlg, getBackChannelAuthRequestJWSAlg, getBackChannelClientNotificationEndpoint, getBackChannelTokenDeliveryMode, getClientRegistrationTypes, getCustomField, getCustomFields, getDPoPBoundAccessTokens, getEmailContacts, getGrantTypes, getJWKSet, getJWKSetURI, getLogoURI, getLogoURI, getLogoURIEntries, getMutualTLSSenderConstrainedAccessTokens, getName, getName, getNameEntries, getOrganizationName, getPolicyURI, getPolicyURI, getPolicyURIEntries, getRedirectionURI, getRedirectionURIs, getRedirectionURIStrings, getRequestObjectJWEAlg, getRequestObjectJWEEnc, getRequestObjectJWSAlg, getRequestObjectURIs, getResponseTypes, getScope, getSignedJWKSetURI, getSoftwareID, getSoftwareStatement, getSoftwareVersion, getTermsOfServiceURI, getTermsOfServiceURI, getTermsOfServiceURIEntries, getTLSClientAuthSanDNS, getTLSClientAuthSanEmail, getTLSClientAuthSanIP, getTLSClientAuthSanURI, getTLSClientAuthSubjectDN, getTLSClientCertificateBoundAccessTokens, getTokenEndpointAuthJWSAlg, getTokenEndpointAuthMethod, getURI, getURI, getURIEntries, hasScopeValue, requiresPushedAuthorizationRequests, requiresPushedAuthorizationRequests, setAuthorizationDetailsTypes, setAuthorizationJWEAlg, setAuthorizationJWEEnc, setAuthorizationJWSAlg, setBackChannelAuthRequestJWSAlg, setBackChannelClientNotificationEndpoint, setBackChannelTokenDeliveryMode, setClientRegistrationTypes, setCustomField, setCustomFields, setDPoPBoundAccessTokens, setEmailContacts, setGrantTypes, setJWKSet, setJWKSetURI, setLogoURI, setLogoURI, setMutualTLSSenderConstrainedAccessTokens, setName, setName, setOrganizationName, setPolicyURI, setPolicyURI, setRedirectionURI, setRedirectionURIs, setRequestObjectJWEAlg, setRequestObjectJWEEnc, setRequestObjectJWSAlg, setRequestObjectURIs, setResponseTypes, setScope, setSignedJWKSetURI, setSoftwareID, setSoftwareStatement, setSoftwareVersion, setSupportsBackChannelUserCodeParam, setTermsOfServiceURI, setTermsOfServiceURI, setTLSClientAuthSanDNS, setTLSClientAuthSanEmail, setTLSClientAuthSanIP, setTLSClientAuthSanURI, setTLSClientAuthSubjectDN, setTLSClientCertificateBoundAccessTokens, setTokenEndpointAuthJWSAlg, setTokenEndpointAuthMethod, setURI, setURI, supportsBackChannelUserCodeParam, toJSONObject, toString
-
Constructor Details
-
OIDCClientMetadata
public OIDCClientMetadata()Creates a new OpenID Connect client metadata instance. -
OIDCClientMetadata
Creates a new OpenID Connect client metadata instance from the specified base OAuth 2.0 client metadata.- Parameters:
metadata- The base OAuth 2.0 client metadata. Must not benull.
-
OIDCClientMetadata
Creates a shallow copy of the specified OpenID Connect client metadata instance.- Parameters:
metadata- The client metadata to copy. Must not benull.
-
-
Method Details
-
getRegisteredParameterNames
Gets the registered (standard) OpenID Connect client metadata parameter names.- Returns:
- The registered OpenID Connect parameter names, as an unmodifiable set.
-
getApplicationType
Gets the client application type. Corresponds to theapplication_typeclient metadata field.- Returns:
- The client application type,
nullif not specified.
-
setApplicationType
Sets the client application type. Corresponds to theapplication_typeclient metadata field.- Parameters:
applicationType- The client application type,nullif not specified.
-
getSubjectType
Gets the subject identifier type for responses to this client. Corresponds to thesubject_typeclient metadata field.- Returns:
- The subject identifier type,
nullif not specified.
-
setSubjectType
Sets the subject identifier type for responses to this client. Corresponds to thesubject_typeclient metadata field.- Parameters:
subjectType- The subject identifier type,nullif not specified.
-
getSectorIDURI
Gets the sector identifier URI. Corresponds to thesector_identifier_uriclient metadata field.- Returns:
- The sector identifier URI,
nullif not specified.
-
setSectorIDURI
Sets the sector identifier URI. Corresponds to thesector_identifier_uriclient metadata field. If set the URI will be checked for having anhttpsscheme and a host component unless the URI is an URN.- Parameters:
sectorIDURI- The sector identifier URI,nullif not specified.- Throws:
IllegalArgumentException- If the URI was found to be illegal.
-
resolveSectorID
Resolves the sector identifier from the client metadata.- Returns:
- The sector identifier,
nullif the subject type is set to public. - Throws:
IllegalStateException- If resolution failed due to incomplete or inconsistent metadata.
-
getIDTokenJWSAlg
Gets the JSON Web Signature (JWS) algorithm required for the ID Tokens issued to this client. Corresponds to theid_token_signed_response_algclient metadata field.- Returns:
- The JWS algorithm,
nullif not specified.
-
setIDTokenJWSAlg
Sets the JSON Web Signature (JWS) algorithm required for the ID Tokens issued to this client. Corresponds to theid_token_signed_response_algclient metadata field.- Parameters:
idTokenJWSAlg- The JWS algorithm,nullif not specified.
-
getIDTokenJWEAlg
Gets the JSON Web Encryption (JWE) algorithm required for the ID Tokens issued to this client. Corresponds to theid_token_encrypted_response_algclient metadata field.- Returns:
- The JWE algorithm,
nullif not specified.
-
setIDTokenJWEAlg
Sets the JSON Web Encryption (JWE) algorithm required for the ID Tokens issued to this client. Corresponds to theid_token_encrypted_response_algclient metadata field.- Parameters:
idTokenJWEAlg- The JWE algorithm,nullif not specified.
-
getIDTokenJWEEnc
Gets the JSON Web Encryption (JWE) method required for the ID Tokens issued to this client. Corresponds to theid_token_encrypted_response_encclient metadata field.- Returns:
- The JWE method,
nullif not specified.
-
setIDTokenJWEEnc
Sets the JSON Web Encryption (JWE) method required for the ID Tokens issued to this client. Corresponds to theid_token_encrypted_response_encclient metadata field.- Parameters:
idTokenJWEEnc- The JWE method,nullif not specified.
-
getUserInfoJWSAlg
Gets the JSON Web Signature (JWS) algorithm required for the UserInfo responses to this client. Corresponds to theuserinfo_signed_response_algclient metadata field.- Returns:
- The JWS algorithm,
nullif not specified.
-
setUserInfoJWSAlg
Sets the JSON Web Signature (JWS) algorithm required for the UserInfo responses to this client. Corresponds to theuserinfo_signed_response_algclient metadata field.- Parameters:
userInfoJWSAlg- The JWS algorithm,nullif not specified.
-
getUserInfoJWEAlg
Gets the JSON Web Encryption (JWE) algorithm required for the UserInfo responses to this client. Corresponds to theuserinfo_encrypted_response_algclient metadata field.- Returns:
- The JWE algorithm,
nullif not specified.
-
setUserInfoJWEAlg
Sets the JSON Web Encryption (JWE) algorithm required for the UserInfo responses to this client. Corresponds to theuserinfo_encrypted_response_algclient metadata field.- Parameters:
userInfoJWEAlg- The JWE algorithm,nullif not specified.
-
getUserInfoJWEEnc
Gets the JSON Web Encryption (JWE) method required for the UserInfo responses to this client. Corresponds to theuserinfo_encrypted_response_encclient metadata field.- Returns:
- The JWE method,
nullif not specified.
-
setUserInfoJWEEnc
Sets the JSON Web Encryption (JWE) method required for the UserInfo responses to this client. Corresponds to theuserinfo_encrypted_response_encclient metadata field.- Parameters:
userInfoJWEEnc- The JWE method,nullif not specified.
-
getDefaultMaxAge
Gets the default maximum authentication age. Corresponds to thedefault_max_ageclient metadata field.- Returns:
- The default max authentication age, in seconds. If not specified -1.
-
setDefaultMaxAge
Sets the default maximum authentication age. Corresponds to thedefault_max_ageclient metadata field.- Parameters:
defaultMaxAge- The default max authentication age, in seconds. If not specified -1.
-
requiresAuthTime
Gets the default requirement for theauth_timeclaim in the ID Token. Corresponds to therequire_auth_timeclient metadata field.- Returns:
- If
truetheauth_Timeclaim in the ID Token is required by default.
-
requiresAuthTime
Sets the default requirement for theauth_timeclaim in the ID Token. Corresponds to therequire_auth_timeclient metadata field.- Parameters:
requiresAuthTime- Iftruetheauth_Timeclaim in the ID Token is required by default.
-
getDefaultACRs
Gets the default Authentication Context Class Reference (ACR) values. Corresponds to thedefault_acr_valuesclient metadata field.- Returns:
- The default ACR values, by order of preference,
nullif not specified.
-
setDefaultACRs
Sets the default Authentication Context Class Reference (ACR) values. Corresponds to thedefault_acr_valuesclient metadata field.- Parameters:
defaultACRs- The default ACRs, by order of preference,nullif not specified.
-
getInitiateLoginURI
Gets the HTTPS URI that the authorisation server can call to initiate a login at the client. Corresponds to theinitiate_login_uriclient metadata field.- Returns:
- The login URI,
nullif not specified.
-
setInitiateLoginURI
Sets the HTTPS URI that the authorisation server can call to initiate a login at the client. Corresponds to theinitiate_login_uriclient metadata field.- Parameters:
loginURI- The login URI,nullif not specified. The URI scheme must be https.
-
getPostLogoutRedirectionURIs
Gets the post logout redirection URIs. Corresponds to thepost_logout_redirect_urisclient metadata field.- Returns:
- The logout redirection URIs,
nullif not specified.
-
setPostLogoutRedirectionURIs
Sets the post logout redirection URIs. Corresponds to thepost_logout_redirect_urisclient metadata field.- Parameters:
logoutURIs- The post logout redirection URIs,nullif not specified.
-
getFrontChannelLogoutURI
Gets the front-channel logout URI. Corresponds to thefrontchannel_logout_uriclient metadata field.- Returns:
- The front-channel logout URI,
nullif not specified.
-
setFrontChannelLogoutURI
Sets the front-channel logout URI. Corresponds to thefrontchannel_logout_uriclient metadata field.- Parameters:
frontChannelLogoutURI- The front-channel logout URI,nullif not specified.
-
requiresFrontChannelLogoutSession
Gets the requirement for a session identifier on front-channel logout. Corresponds to thefrontchannel_logout_session_requiredclient metadata field.- Returns:
trueif a session identifier is required, elsefalse.
-
requiresFrontChannelLogoutSession
Sets the requirement for a session identifier on front-channel logout. Corresponds to thefrontchannel_logout_session_requiredclient metadata field.- Parameters:
requiresSession-trueif a session identifier is required, elsefalse.
-
getBackChannelLogoutURI
Gets the back-channel logout URI. Corresponds to thebackchannel_logout_uriclient metadata field.- Returns:
- The back-channel logout URI,
nullif not specified.
-
setBackChannelLogoutURI
Sets the back-channel logout URI. Corresponds to thebackchannel_logout_uriclient metadata field.- Parameters:
backChannelLogoutURI- The back-channel logout URI,nullif not specified. The URI scheme must be https or http.
-
requiresBackChannelLogoutSession
Gets the requirement for a session identifier on back-channel logout. Corresponds to thebackchannel_logout_session_requiredclient metadata field.- Returns:
trueif a session identifier is required, elsefalse.
-
requiresBackChannelLogoutSession
Sets the requirement for a session identifier on back-channel logout. Corresponds to thebackchannel_logout_session_requiredclient metadata field.- Parameters:
requiresSession-trueif a session identifier is required, elsefalse.
-
getAttachmentDigestAlg
Gets the digest algorithm for the external evidence attachments in OpenID Connect for Identity Assurance 1.0. Corresponds to thedigest_algorithmclient metadata field.- Returns:
- The digest algorithm,
nullif not specified.
-
setAttachmentDigestAlg
Sets the digest algorithm for the external evidence attachments in OpenID Connect for Identity Assurance 1.0. Corresponds to thedigest_algorithmclient metadata field.- Parameters:
hashAlg- The digest algorithm,nullif not specified.
-
applyDefaults
Applies the client metadata defaults where no values have been specified.- The response types default to
["code"]. - The grant types default to
"authorization_code". - The client authentication method defaults to "client_secret_basic".
- The application type defaults to
ApplicationType.WEB. - The ID token JWS algorithm defaults to "RS256".
- Overrides:
applyDefaultsin classClientMetadata
- The response types default to
-
toJSONObject
Description copied from class:ClientMetadataReturns the JSON object representation of this client metadata.- Overrides:
toJSONObjectin classClientMetadata- Parameters:
includeCustomFields-trueto include any custom metadata fields,falseto omit them.- Returns:
- The JSON object.
-
parse
public static OIDCClientMetadata parse(net.minidev.json.JSONObject jsonObject) throws ParseException Parses an OpenID Connect client metadata instance from the specified JSON object.- Parameters:
jsonObject- The JSON object to parse. Must not benull.- Returns:
- The OpenID Connect client metadata.
- Throws:
ParseException- If the JSON object couldn't be parsed to an OpenID Connect client metadata instance.
-