Package com.nimbusds.oauth2.sdk.client
Class ClientMetadata
java.lang.Object
com.nimbusds.oauth2.sdk.client.ClientMetadata
- Direct Known Subclasses:
OIDCClientMetadata
Client metadata.
Example client metadata, serialised to a JSON object:
{ "redirect_uris" : ["https://client.example.org/callback", "https://client.example.org/callback2"], "client_name" : "My Example Client", "client_name#ja-Jpan-JP" : "クライアント名", "token_endpoint_auth_method" : "client_secret_basic", "scope" : "read write dolphin", "logo_uri" : "https://client.example.org/logo.png", "jwks_uri" : "https://client.example.org/my_public_keys.jwks" }
Related specifications:
- OAuth 2.0 Dynamic Client Registration Protocol (RFC 7591), section 2.
- OAuth 2.0 Mutual TLS Client Authentication and Certificate Bound Access Tokens (RFC 8705), sections 2.1.2 and 3.4.
- OAuth 2.0 Demonstrating Proof of Possession (DPoP) (RFC 9449), section 5.2.
- 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), section 10.
- OpenID Connect Client Initiated Backchannel Authentication Flow - Core 1.0
- OpenID Connect Federation 1.0 (draft 22)
-
Field Summary
Modifier and TypeFieldDescriptionDeprecated. -
Constructor Summary
ConstructorDescriptionCreates a new OAuth 2.0 client metadata instance.ClientMetadata
(ClientMetadata metadata) Creates a shallow copy of the specified OAuth 2.0 client metadata instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Applies the client metadata defaults where no values have been specified.Gets the authorisation details types for Rich Authorisation Requests (RAR).com.nimbusds.jose.JWEAlgorithm
Gets the JWE algorithm for JWT-encoded authorisation responses.com.nimbusds.jose.EncryptionMethod
Sets the encryption method for JWT-encoded authorisation responses.com.nimbusds.jose.JWSAlgorithm
Gets the JWS algorithm for JWT-encoded authorisation responses.com.nimbusds.jose.JWSAlgorithm
Gets the JWS algorithm for CIBA requests.Gets the CIBA client notification endpoint URI for the ping or push delivery modes.Gets the CIBA token delivery mode.Gets the supported OpenID Connect Federation 1.0 client registration types.getCustomField
(String name) Gets the specified custom metadata field.net.minidev.json.JSONObject
Gets the custom metadata fields.boolean
Gets the preference for DPoP bound access tokens.Gets the administrator email contacts for the client.Gets the expected OAuth 2.0 grant types.com.nimbusds.jose.jwk.JWKSet
Gets this client's JSON Web Key (JWK) set containing key(s) that are used in signing requests to the server and key(s) for encrypting responses.Gets the URI for this client's JSON Web Key (JWK) set containing key(s) that are used in signing requests to the server and key(s) for encrypting responses.Gets the client application logo.getLogoURI
(com.nimbusds.langtag.LangTag langTag) Gets the client application logo.Gets the client application logo entries.boolean
Deprecated.getName()
Gets the client name.getName
(com.nimbusds.langtag.LangTag langTag) Gets the client name.Gets the client name entries.Gets the organisation name in OpenID Connect Federation 1.0.Gets the client policy for use of end-user data.getPolicyURI
(com.nimbusds.langtag.LangTag langTag) Gets the client policy for use of end-user data.Gets the client policy entries for use of end-user data.Gets one of the redirection URIs for this client.Gets the redirection URIs for this client.Gets the redirection URIs for this client as strings.Gets the registered (standard) OAuth 2.0 client metadata parameter names.com.nimbusds.jose.JWEAlgorithm
Gets the JSON Web Encryption (JWE) algorithm required for request objects sent by this client.com.nimbusds.jose.EncryptionMethod
Gets the JSON Web Encryption (JWE) method required for request objects sent by this client.com.nimbusds.jose.JWSAlgorithm
Gets the JSON Web Signature (JWS) algorithm required for request objects sent by this client.Gets the pre-registered request object URIs.Gets the expected OAuth 2.0 response types.getScope()
Gets the scope values that the client can use when requesting access tokens.Gets the URI for this client's signed JSON Web Key (JWK) set containing key(s) that are used in signing requests to the server and key(s) for encrypting responses.Gets the identifier for the OAuth 2.0 client software.com.nimbusds.jwt.SignedJWT
Gets the software statement.Gets the version identifier for the OAuth 2.0 client software.Gets the client's terms of service.getTermsOfServiceURI
(com.nimbusds.langtag.LangTag langTag) Gets the client's terms of service.Gets the client's terms of service entries.Gets the expected dNSName SAN entry in the X.509 certificate, which the OAuth client will use in mutual TLS authentication.Gets the expected rfc822Name SAN entry in the X.509 certificate, which the OAuth client will use in mutual TLS authentication.Gets the expected iPAddress SAN entry in the X.509 certificate, which the OAuth client will use in mutual TLS authentication.Gets the expected uniformResourceIdentifier SAN entry in the X.509 certificate, which the OAuth client will use in mutual TLS authentication.Gets the expected subject distinguished name (DN) of the client X.509 certificate in mutual TLS authentication.boolean
Gets the preference for TLS client certificate bound access tokens.com.nimbusds.jose.JWSAlgorithm
Gets the JSON Web Signature (JWS) algorithm required forprivate_key_jwt
andclient_secret_jwt
authentication at the Token endpoint.Gets the Token endpoint authentication method.getURI()
Gets the client home page.getURI
(com.nimbusds.langtag.LangTag langTag) Gets the client home page.Gets the client home page entries.boolean
hasScopeValue
(Scope.Value scopeValue) Checks if the scope matadata field is set and contains the specified scope value.static ClientMetadata
parse
(net.minidev.json.JSONObject jsonObject) Parses a client metadata instance from the specified JSON object.boolean
Gets the requirement for pushed authorisation requests (PAR).void
requiresPushedAuthorizationRequests
(boolean requirePAR) Sets the requirement for pushed authorisation requests (PAR).void
setAuthorizationDetailsTypes
(List<AuthorizationType> authzTypes) Sets the authorisation details types for Rich Authorisation Requests (RAR).void
setAuthorizationJWEAlg
(com.nimbusds.jose.JWEAlgorithm authzJWEAlg) Sets the JWE algorithm for JWT-encoded authorisation responses.void
setAuthorizationJWEEnc
(com.nimbusds.jose.EncryptionMethod authzJWEEnc) Sets the encryption method for JWT-encoded authorisation responses.void
setAuthorizationJWSAlg
(com.nimbusds.jose.JWSAlgorithm authzJWSAlg) Sets the JWS algorithm for JWT-encoded authorisation responses.void
setBackChannelAuthRequestJWSAlg
(com.nimbusds.jose.JWSAlgorithm backChannelAuthRequestJWSAlg) Sets the JWS algorithm for CIBA requests.void
setBackChannelClientNotificationEndpoint
(URI backChannelClientNotificationEndpoint) Sets the CIBA client notification endpoint URI for the ping or push delivery modes.void
setBackChannelTokenDeliveryMode
(BackChannelTokenDeliveryMode backChannelTokenDeliveryMode) Sets the CIBA token delivery mode.void
setClientRegistrationTypes
(List<ClientRegistrationType> regTypes) Sets the supported OpenID Connect Federation 1.0 client registration types.void
setCustomField
(String name, Object value) Sets the specified custom metadata field.void
setCustomFields
(net.minidev.json.JSONObject customFields) Sets the custom metadata fields.void
setDPoPBoundAccessTokens
(boolean dPoPBoundAccessTokens) Sets the preference for DPoP bound access tokens.void
setEmailContacts
(List<String> contacts) Sets the administrator email contacts for the client.void
setGrantTypes
(Set<GrantType> grantTypes) Sets the expected OAuth 2.0 grant types.void
setJWKSet
(com.nimbusds.jose.jwk.JWKSet jwkSet) Sets this client's JSON Web Key (JWK) set containing key(s) that are used in signing requests to the server and key(s) for encrypting responses.void
setJWKSetURI
(URI jwkSetURI) Sets the URI for this client's JSON Web Key (JWK) set containing key(s) that are used in signing requests to the server and key(s) for encrypting responses.void
setLogoURI
(URI logoURI) Sets the client application logo.void
setLogoURI
(URI logoURI, com.nimbusds.langtag.LangTag langTag) Sets the client application logo.void
setMutualTLSSenderConstrainedAccessTokens
(boolean tlsSenderAccessTokens) Deprecated.void
Sets the client name.void
Sets the client name.void
setOrganizationName
(String organizationName) Sets the organisation name in OpenID Connect Federation 1.0.void
setPolicyURI
(URI policyURI) Sets the client policy for use of end-user data.void
setPolicyURI
(URI policyURI, com.nimbusds.langtag.LangTag langTag) Sets the client policy for use of end-user data.void
setRedirectionURI
(URI redirectURI) Sets a single redirection URI for this client.void
setRedirectionURIs
(Set<URI> redirectURIs) Sets the redirection URIs for this client.void
setRequestObjectJWEAlg
(com.nimbusds.jose.JWEAlgorithm requestObjectJWEAlg) Sets the JSON Web Encryption (JWE) algorithm required for request objects sent by this client.void
setRequestObjectJWEEnc
(com.nimbusds.jose.EncryptionMethod requestObjectJWEEnc) Sets the JSON Web Encryption (JWE) method required for request objects sent by this client.void
setRequestObjectJWSAlg
(com.nimbusds.jose.JWSAlgorithm requestObjectJWSAlg) Sets the JSON Web Signature (JWS) algorithm required for request objects sent by this client.void
setRequestObjectURIs
(Set<URI> requestObjectURIs) Sets the pre-registered request object URIs.void
setResponseTypes
(Set<ResponseType> responseTypes) Sets the expected OAuth 2.0 response types.void
Sets the scope values that the client can use when requesting access tokens.void
setSignedJWKSetURI
(URI signedJWKSetURI) Sets the URI for this client's signed JSON Web Key (JWK) set containing key(s) that are used in signing requests to the server and key(s) for encrypting responses.void
setSoftwareID
(SoftwareID softwareID) Sets the identifier for the OAuth 2.0 client software.void
setSoftwareStatement
(com.nimbusds.jwt.SignedJWT softwareStatement) Sets the software statement.void
setSoftwareVersion
(SoftwareVersion softwareVersion) Sets the version identifier for the OAuth 2.0 client software.void
setSupportsBackChannelUserCodeParam
(boolean backChannelUserCodeParam) Sets the support for theuser_code
CIBA request parameter.void
setTermsOfServiceURI
(URI tosURI) Sets the client's terms of service.void
setTermsOfServiceURI
(URI tosURI, com.nimbusds.langtag.LangTag langTag) Sets the client's terms of service.void
Sets the expected dNSName SAN entry in the X.509 certificate, which the OAuth client will use in mutual TLS authentication.void
setTLSClientAuthSanEmail
(String email) Sets the expected rfc822Name SAN entry in the X.509 certificate, which the OAuth client will use in mutual TLS authentication.void
Sets the expected iPAddress SAN entry in the X.509 certificate, which the OAuth client will use in mutual TLS authentication.void
Sets the expected uniformResourceIdentifier SAN entry in the X.509 certificate, which the OAuth client will use in mutual TLS authentication.void
setTLSClientAuthSubjectDN
(String subjectDN) Sets the expected subject distinguished name (DN) of the client X.509 certificate in mutual TLS authentication.void
setTLSClientCertificateBoundAccessTokens
(boolean tlsClientCertBoundTokens) Sets the preference for TLS client certificate bound access tokens.void
setTokenEndpointAuthJWSAlg
(com.nimbusds.jose.JWSAlgorithm authJWSAlg) Sets the JSON Web Signature (JWS) algorithm required forprivate_key_jwt
andclient_secret_jwt
authentication at the Token endpoint.void
setTokenEndpointAuthMethod
(ClientAuthenticationMethod authMethod) Sets the Token endpoint authentication method.void
Sets the client home page.void
Sets the client home page.boolean
Gets the support for theuser_code
CIBA request parameter.net.minidev.json.JSONObject
Returns the JSON object representation of this client metadata, including any custom fields.net.minidev.json.JSONObject
toJSONObject
(boolean includeCustomFields) Returns the JSON object representation of this client metadata.toString()
-
Field Details
-
PROHIBITED_REDIRECT_URI_SCHEMES
Deprecated.
-
-
Constructor Details
-
ClientMetadata
public ClientMetadata()Creates a new OAuth 2.0 client metadata instance. -
ClientMetadata
Creates a shallow copy of the specified OAuth 2.0 client metadata instance.- Parameters:
metadata
- The client metadata to copy. Must not benull
.
-
-
Method Details
-
getRegisteredParameterNames
Gets the registered (standard) OAuth 2.0 client metadata parameter names.- Returns:
- The registered parameter names, as an unmodifiable set.
-
getRedirectionURIs
Gets the redirection URIs for this client. Corresponds to theredirect_uris
client metadata field.- Returns:
- The redirection URIs,
null
if not specified.
-
getRedirectionURI
Gets one of the redirection URIs for this client. Corresponds to theredirect_uris
client metadata field.- Returns:
- The redirection URI,
null
if not specified.
-
getRedirectionURIStrings
Gets the redirection URIs for this client as strings. Corresponds to theredirect_uris
client metadata field.This short-hand method is intended to enable string-based URI comparison.
- Returns:
- The redirection URIs as strings,
null
if not specified.
-
setRedirectionURIs
Sets the redirection URIs for this client. Corresponds to theredirect_uris
client metadata field.- Parameters:
redirectURIs
- The redirection URIs,null
if not specified. Valid redirection URIs must not contain a fragment.
-
setRedirectionURI
Sets a single redirection URI for this client. Corresponds to theredirect_uris
client metadata field.- Parameters:
redirectURI
- The redirection URIs,null
if not specified. A valid redirection URI must not contain a fragment.
-
getScope
Gets the scope values that the client can use when requesting access tokens. Corresponds to thescope
client metadata field.- Returns:
- The scope,
null
if not specified.
-
hasScopeValue
Checks if the scope matadata field is set and contains the specified scope value.- Parameters:
scopeValue
- The scope value. Must not benull
.- Returns:
true
if the scope value is contained, elsefalse
.
-
setScope
Sets the scope values that the client can use when requesting access tokens. Corresponds to thescope
client metadata field.- Parameters:
scope
- The scope,null
if not specified.
-
getResponseTypes
Gets the expected OAuth 2.0 response types. Corresponds to theresponse_types
client metadata field.- Returns:
- The response types,
null
if not specified.
-
setResponseTypes
Sets the expected OAuth 2.0 response types. Corresponds to theresponse_types
client metadata field.- Parameters:
responseTypes
- The response types,null
if not specified.
-
getGrantTypes
Gets the expected OAuth 2.0 grant types. Corresponds to thegrant_types
client metadata field.- Returns:
- The grant types,
null
if not specified.
-
setGrantTypes
Sets the expected OAuth 2.0 grant types. Corresponds to thegrant_types
client metadata field.- Parameters:
grantTypes
- The grant types,null
if not specified.
-
getEmailContacts
Gets the administrator email contacts for the client. Corresponds to thecontacts
client metadata field.- Returns:
- The administrator email contacts,
null
if not specified.
-
setEmailContacts
Sets the administrator email contacts for the client. Corresponds to thecontacts
client metadata field.- Parameters:
contacts
- The administrator email contacts,null
if not specified.
-
getName
Gets the client name. Corresponds to theclient_name
client metadata field, with no language tag.- Returns:
- The client name,
null
if not specified.
-
getName
Gets the client name. Corresponds to theclient_name
client metadata field, with an optional language tag.- Parameters:
langTag
- The language tag of the entry,null
to get the non-tagged entry.- Returns:
- The client name,
null
if not specified.
-
getNameEntries
Gets the client name entries. Corresponds to theclient_name
client metadata field.- Returns:
- The client name entries, empty map if none.
-
setName
Sets the client name. Corresponds to theclient_name
client metadata field, with no language tag.- Parameters:
name
- The client name,null
if not specified.
-
setName
Sets the client name. Corresponds to theclient_name
client metadata field, with an optional language tag.- Parameters:
name
- The client name. Must not benull
.langTag
- The language tag,null
if not specified.
-
getLogoURI
Gets the client application logo. Corresponds to thelogo_uri
client metadata field, with no language tag.- Returns:
- The logo URI,
null
if not specified.
-
getLogoURI
Gets the client application logo. Corresponds to thelogo_uri
client metadata field, with an optional language tag.- Parameters:
langTag
- The language tag,null
if not specified.- Returns:
- The logo URI,
null
if not specified.
-
getLogoURIEntries
Gets the client application logo entries. Corresponds to thelogo_uri
client metadata field.- Returns:
- The logo URI entries, empty map if none.
-
setLogoURI
Sets the client application logo. Corresponds to thelogo_uri
client metadata field, with no language tag.- Parameters:
logoURI
- The logo URI,null
if not specified.
-
setLogoURI
Sets the client application logo. Corresponds to thelogo_uri
client metadata field, with an optional language tag.- Parameters:
logoURI
- The logo URI. Must not benull
.langTag
- The language tag,null
if not specified.
-
getURI
Gets the client home page. Corresponds to theclient_uri
client metadata field, with no language tag.- Returns:
- The client URI,
null
if not specified.
-
getURI
Gets the client home page. Corresponds to theclient_uri
client metadata field, with an optional language tag.- Parameters:
langTag
- The language tag,null
if not specified.- Returns:
- The client URI,
null
if not specified.
-
getURIEntries
Gets the client home page entries. Corresponds to theclient_uri
client metadata field.- Returns:
- The client URI entries, empty map if none.
-
setURI
Sets the client home page. Corresponds to theclient_uri
client metadata field, with no language tag.- Parameters:
uri
- The client URI,null
if not specified. The URI scheme must be https or http.
-
setURI
Sets the client home page. Corresponds to theclient_uri
client metadata field, with an optional language tag.- Parameters:
uri
- The URI. The URI scheme must be https or http. Must not benull
.langTag
- The language tag,null
if not specified.
-
getPolicyURI
Gets the client policy for use of end-user data. Corresponds to thepolicy_uri
client metadata field, with no language tag.- Returns:
- The policy URI,
null
if not specified.
-
getPolicyURI
Gets the client policy for use of end-user data. Corresponds to thepolicy_uri
client metadata field, with an optional language tag.- Parameters:
langTag
- The language tag,null
if not specified.- Returns:
- The policy URI,
null
if not specified.
-
getPolicyURIEntries
Gets the client policy entries for use of end-user data. Corresponds to thepolicy_uri
client metadata field.- Returns:
- The policy URI entries, empty map if none.
-
setPolicyURI
Sets the client policy for use of end-user data. Corresponds to thepolicy_uri
client metadata field, with no language tag.- Parameters:
policyURI
- The policy URI,null
if not specified. The URI scheme must be https or http.
-
setPolicyURI
Sets the client policy for use of end-user data. Corresponds to thepolicy_uri
client metadata field, with an optional language tag.- Parameters:
policyURI
- The policy URI. The URI scheme must be https or http. Must not benull
.langTag
- The language tag,null
if not specified.
-
getTermsOfServiceURI
Gets the client's terms of service. Corresponds to thetos_uri
client metadata field, with no language tag.- Returns:
- The terms of service URI,
null
if not specified.
-
getTermsOfServiceURI
Gets the client's terms of service. Corresponds to thetos_uri
client metadata field, with an optional language tag.- Parameters:
langTag
- The language tag,null
if not specified.- Returns:
- The terms of service URI,
null
if not specified.
-
getTermsOfServiceURIEntries
Gets the client's terms of service entries. Corresponds to thetos_uri
client metadata field.- Returns:
- The terms of service URI entries, empty map if none.
-
setTermsOfServiceURI
Sets the client's terms of service. Corresponds to thetos_uri
client metadata field, with no language tag.- Parameters:
tosURI
- The terms of service URI,null
if not specified. The URI scheme must be https or http.
-
setTermsOfServiceURI
Sets the client's terms of service. Corresponds to thetos_uri
client metadata field, with an optional language tag.- Parameters:
tosURI
- The terms of service URI. The URI scheme must not be https or http. Must not benull
.langTag
- The language tag,null
if not specified.
-
getTokenEndpointAuthMethod
Gets the Token endpoint authentication method. Corresponds to thetoken_endpoint_auth_method
client metadata field.- Returns:
- The Token endpoint authentication method,
null
if not specified.
-
setTokenEndpointAuthMethod
Sets the Token endpoint authentication method. Corresponds to thetoken_endpoint_auth_method
client metadata field.- Parameters:
authMethod
- The Token endpoint authentication method,null
if not specified.
-
getTokenEndpointAuthJWSAlg
Gets the JSON Web Signature (JWS) algorithm required forprivate_key_jwt
andclient_secret_jwt
authentication at the Token endpoint. Corresponds to thetoken_endpoint_auth_signing_alg
client metadata field.- Returns:
- The JWS algorithm,
null
if not specified.
-
setTokenEndpointAuthJWSAlg
Sets the JSON Web Signature (JWS) algorithm required forprivate_key_jwt
andclient_secret_jwt
authentication at the Token endpoint. Corresponds to thetoken_endpoint_auth_signing_alg
client metadata field.- Parameters:
authJWSAlg
- The JWS algorithm,null
if not specified.
-
getJWKSetURI
Gets the URI for this client's JSON Web Key (JWK) set containing key(s) that are used in signing requests to the server and key(s) for encrypting responses. Corresponds to thejwks_uri
client metadata field.- Returns:
- The JWK set URI,
null
if not specified.
-
setJWKSetURI
Sets the URI for this client's JSON Web Key (JWK) set containing key(s) that are used in signing requests to the server and key(s) for encrypting responses. Corresponds to thejwks_uri
client metadata field.- Parameters:
jwkSetURI
- The JWK set URI,null
if not specified.
-
getSignedJWKSetURI
Gets the URI for this client's signed JSON Web Key (JWK) set containing key(s) that are used in signing requests to the server and key(s) for encrypting responses. Corresponds to thesigned_jwks_uri
client metadata field. Intended for use in OpenID Connect Federation 1.0.- Returns:
- The signed JWK set URI,
null
if not specified.
-
setSignedJWKSetURI
Sets the URI for this client's signed JSON Web Key (JWK) set containing key(s) that are used in signing requests to the server and key(s) for encrypting responses. Corresponds to thesigned_jwks_uri
client metadata field. Intended for use in OpenID Connect Federation 1.0.- Parameters:
signedJWKSetURI
- The signed JWK set URI,null
if not specified.
-
getJWKSet
Gets this client's JSON Web Key (JWK) set containing key(s) that are used in signing requests to the server and key(s) for encrypting responses. Intended as an alternative togetJWKSetURI()
for native clients. Corresponds to thejwks
client metadata field.- Returns:
- The JWK set,
null
if not specified.
-
setJWKSet
Sets this client's JSON Web Key (JWK) set containing key(s) that are used in signing requests to the server and key(s) for encrypting responses. Intended as an alternative togetJWKSetURI()
for native clients. Corresponds to thejwks
client metadata field.- Parameters:
jwkSet
- The JWK set,null
if not specified.
-
getRequestObjectURIs
Gets the pre-registered request object URIs. Corresponds to therequest_uris
client metadata field.- Returns:
- The request object URIs,
null
if not specified.
-
setRequestObjectURIs
Sets the pre-registered request object URIs. Corresponds to therequest_uris
client metadata field.- Parameters:
requestObjectURIs
- The request object URIs,null
if not specified.
-
getRequestObjectJWSAlg
Gets the JSON Web Signature (JWS) algorithm required for request objects sent by this client. Corresponds to therequest_object_signing_alg
client metadata field.- Returns:
- The JWS algorithm,
null
if not specified.
-
setRequestObjectJWSAlg
Sets the JSON Web Signature (JWS) algorithm required for request objects sent by this client. Corresponds to therequest_object_signing_alg
client metadata field.- Parameters:
requestObjectJWSAlg
- The JWS algorithm,null
if not specified.
-
getRequestObjectJWEAlg
Gets the JSON Web Encryption (JWE) algorithm required for request objects sent by this client. Corresponds to therequest_object_encryption_alg
client metadata field.- Returns:
- The JWE algorithm,
null
if not specified.
-
setRequestObjectJWEAlg
Sets the JSON Web Encryption (JWE) algorithm required for request objects sent by this client. Corresponds to therequest_object_encryption_alg
client metadata field.- Parameters:
requestObjectJWEAlg
- The JWE algorithm,null
if not specified.
-
getRequestObjectJWEEnc
Gets the JSON Web Encryption (JWE) method required for request objects sent by this client. Corresponds to therequest_object_encryption_enc
client metadata field.- Returns:
- The JWE method,
null
if not specified.
-
setRequestObjectJWEEnc
Sets the JSON Web Encryption (JWE) method required for request objects sent by this client. Corresponds to therequest_object_encryption_enc
client metadata field.- Parameters:
requestObjectJWEEnc
- The JWE method,null
if not specified.
-
getSoftwareID
Gets the identifier for the OAuth 2.0 client software. Corresponds to thesoftware_id
client metadata field.- Returns:
- The software identifier,
null
if not specified.
-
setSoftwareID
Sets the identifier for the OAuth 2.0 client software. Corresponds to thesoftware_id
client metadata field.- Parameters:
softwareID
- The software identifier,null
if not specified.
-
getSoftwareVersion
Gets the version identifier for the OAuth 2.0 client software. Corresponds to thesoftware_version
client metadata field.- Returns:
- The version identifier,
null
if not specified.
-
setSoftwareVersion
Sets the version identifier for the OAuth 2.0 client software. Corresponds to thesoftware_version
client metadata field.- Parameters:
softwareVersion
- The version identifier,null
if not specified.
-
getSoftwareStatement
Gets the software statement. Corresponds to thesoftware_statement
client metadata field.- Returns:
- The signed software statement,
null
if not specified.
-
setSoftwareStatement
Sets the software statement. Corresponds to thesoftware_statement
client metadata field.- Parameters:
softwareStatement
- The signed software statement,null
if not specified.
-
getTLSClientCertificateBoundAccessTokens
Gets the preference for TLS client certificate bound access tokens. Corresponds to thetls_client_certificate_bound_access_tokens
client metadata field.- Returns:
true
indicates a preference for TLS client certificate bound access tokens,false
if none.
-
setTLSClientCertificateBoundAccessTokens
Sets the preference for TLS client certificate bound access tokens. Corresponds to thetls_client_certificate_bound_access_tokens
client metadata field.- Parameters:
tlsClientCertBoundTokens
-true
indicates a preference for TLS client certificate bound access tokens,false
if none.
-
getMutualTLSSenderConstrainedAccessTokens
Deprecated.Sets the preference for TLS client certificate bound access tokens. Corresponds to thetls_client_certificate_bound_access_tokens
client metadata field.- Returns:
true
indicates a preference for TLS client certificate bound access tokens,false
if none.
-
setMutualTLSSenderConstrainedAccessTokens
Deprecated.Gets the preference for TLS client certificate bound access tokens. Corresponds to thetls_client_certificate_bound_access_tokens
client metadata field.- Parameters:
tlsSenderAccessTokens
-true
indicates a preference for TLS client certificate bound access tokens,false
if none.
-
getTLSClientAuthSubjectDN
Gets the expected subject distinguished name (DN) of the client X.509 certificate in mutual TLS authentication. Corresponds to thetls_client_auth_subject_dn
client metadata field.- Returns:
- The expected subject distinguished name (DN) of the client
X.509 certificate,
null
if not specified.
-
setTLSClientAuthSubjectDN
Sets the expected subject distinguished name (DN) of the client X.509 certificate in mutual TLS authentication. Corresponds to thetls_client_auth_subject_dn
client metadata field.- Parameters:
subjectDN
- The expected subject distinguished name (DN) of the client X.509 certificate,null
if not specified.
-
getTLSClientAuthSanDNS
Gets the expected dNSName SAN entry in the X.509 certificate, which the OAuth client will use in mutual TLS authentication. Corresponds to thetls_client_auth_san_dns
client metadata field.- Returns:
- The expected dNSName SAN entry in the X.509 certificate,
null
if not specified.
-
setTLSClientAuthSanDNS
Sets the expected dNSName SAN entry in the X.509 certificate, which the OAuth client will use in mutual TLS authentication. Corresponds to thetls_client_auth_san_dns
client metadata field.- Parameters:
dns
- The expected dNSName SAN entry in the X.509 certificate,null
if not specified.
-
getTLSClientAuthSanURI
Gets the expected uniformResourceIdentifier SAN entry in the X.509 certificate, which the OAuth client will use in mutual TLS authentication. Corresponds to thetls_client_auth_san_uri
client metadata field.- Returns:
- The expected uniformResourceIdentifier SAN entry in the X.509
certificate,
null
if not specified.
-
setTLSClientAuthSanURI
Sets the expected uniformResourceIdentifier SAN entry in the X.509 certificate, which the OAuth client will use in mutual TLS authentication. Corresponds to thetls_client_auth_san_uri
client metadata field.- Parameters:
uri
- The expected uniformResourceIdentifier SAN entry in the X.509 certificate,null
if not specified.
-
getTLSClientAuthSanIP
Gets the expected iPAddress SAN entry in the X.509 certificate, which the OAuth client will use in mutual TLS authentication. Corresponds to thetls_client_auth_san_ip
client metadata field.- Returns:
- The expected iPAddress SAN entry in the X.509 certificate,
null
if not specified.
-
setTLSClientAuthSanIP
Sets the expected iPAddress SAN entry in the X.509 certificate, which the OAuth client will use in mutual TLS authentication. Corresponds to thetls_client_auth_san_ip
client metadata field.- Parameters:
ip
- The expected iPAddress SAN entry in the X.509 certificate,null
if not specified.
-
getTLSClientAuthSanEmail
Gets the expected rfc822Name SAN entry in the X.509 certificate, which the OAuth client will use in mutual TLS authentication. Corresponds to thetls_client_auth_san_email
client metadata field.- Returns:
- The expected rfc822Name SAN entry in the X.509 certificate,
null
if not specified.
-
setTLSClientAuthSanEmail
Sets the expected rfc822Name SAN entry in the X.509 certificate, which the OAuth client will use in mutual TLS authentication. Corresponds to thetls_client_auth_san_email
client metadata field.- Parameters:
email
- The expected rfc822Name SAN entry in the X.509 certificate,null
if not specified.
-
getDPoPBoundAccessTokens
Gets the preference for DPoP bound access tokens. Corresponds to thedpop_bound_access_tokens
client metadata field.- Returns:
true
indicates a preference for DPoP bound access tokens,false
if none.
-
setDPoPBoundAccessTokens
Sets the preference for DPoP bound access tokens. Corresponds to thedpop_bound_access_tokens
client metadata field.- Parameters:
dPoPBoundAccessTokens
-true
indicates a preference for DPoP bound access tokens,false
if none.
-
getAuthorizationJWSAlg
Gets the JWS algorithm for JWT-encoded authorisation responses. Corresponds to theauthorization_signed_response_alg
client metadata field.- Returns:
- The JWS algorithm,
null
if not specified.
-
setAuthorizationJWSAlg
Sets the JWS algorithm for JWT-encoded authorisation responses. Corresponds to theauthorization_signed_response_alg
client metadata field.- Parameters:
authzJWSAlg
- The JWS algorithm,null
if not specified. Must not be"none"
.
-
getAuthorizationJWEAlg
Gets the JWE algorithm for JWT-encoded authorisation responses. Corresponds to theauthorization_encrypted_response_alg
client metadata field.- Returns:
- The JWE algorithm,
null
if not specified.
-
setAuthorizationJWEAlg
Sets the JWE algorithm for JWT-encoded authorisation responses. Corresponds to theauthorization_encrypted_response_alg
client metadata field.- Parameters:
authzJWEAlg
- The JWE algorithm,null
if not specified.
-
getAuthorizationJWEEnc
Sets the encryption method for JWT-encoded authorisation responses. Corresponds to theauthorization_encrypted_response_enc
client metadata field.- Returns:
- The encryption method,
null
if specified.
-
setAuthorizationJWEEnc
Sets the encryption method for JWT-encoded authorisation responses. Corresponds to theauthorization_encrypted_response_enc
client metadata field.- Parameters:
authzJWEEnc
- The encryption method,null
if specified.
-
requiresPushedAuthorizationRequests
Gets the requirement for pushed authorisation requests (PAR). Corresponds to thepushed_authorization_request_endpoint
client metadata field.- Returns:
true
if PAR is required, elsefalse
.
-
requiresPushedAuthorizationRequests
Sets the requirement for pushed authorisation requests (PAR). Corresponds to thepushed_authorization_request_endpoint
client metadata field.- Parameters:
requirePAR
-true
if PAR is required, elsefalse
.
-
getAuthorizationDetailsTypes
Gets the authorisation details types for Rich Authorisation Requests (RAR). Corresponds to theauthorization_details_types
metadata field.- Returns:
- The authorisation types,
null
if not specified.
-
setAuthorizationDetailsTypes
Sets the authorisation details types for Rich Authorisation Requests (RAR). Corresponds to theauthorization_details_types
metadata field.- Parameters:
authzTypes
- The authorisation types,null
if not specified.
-
getBackChannelTokenDeliveryMode
Gets the CIBA token delivery mode. Corresponds to thebackchannel_token_delivery_mode
metadata field.- Returns:
- The CIBA token delivery mode,
null
if not specified.
-
setBackChannelTokenDeliveryMode
public void setBackChannelTokenDeliveryMode(BackChannelTokenDeliveryMode backChannelTokenDeliveryMode) Sets the CIBA token delivery mode. Corresponds to thebackchannel_token_delivery_mode
metadata field.- Parameters:
backChannelTokenDeliveryMode
- The CIBA token delivery mode,null
if not specified.
-
getBackChannelClientNotificationEndpoint
Gets the CIBA client notification endpoint URI for the ping or push delivery modes. Corresponds to thebackchannel_client_notification_endpoint
metadata field.- Returns:
- The CIBA client notification endpoint URI,
null
if not specified.
-
setBackChannelClientNotificationEndpoint
Sets the CIBA client notification endpoint URI for the ping or push delivery modes. Corresponds to thebackchannel_client_notification_endpoint
metadata field.- Parameters:
backChannelClientNotificationEndpoint
- The CIBA client notification endpoint URI,null
if not specified.
-
getBackChannelAuthRequestJWSAlg
Gets the JWS algorithm for CIBA requests. Corresponds to thebackchannel_authentication_request_signing_alg
metadata field.- Returns:
- The JWS algorithm for CIBA requests,
null
if not specified.
-
setBackChannelAuthRequestJWSAlg
public void setBackChannelAuthRequestJWSAlg(com.nimbusds.jose.JWSAlgorithm backChannelAuthRequestJWSAlg) Sets the JWS algorithm for CIBA requests. Corresponds to thebackchannel_authentication_request_signing_alg
metadata field.- Parameters:
backChannelAuthRequestJWSAlg
- The JWS algorithm for CIBA requests,null
if not specified.
-
supportsBackChannelUserCodeParam
Gets the support for theuser_code
CIBA request parameter. Corresponds to thebackchannel_user_code_parameter
metadata field.- Returns:
true
if theuser_code
parameter is supported, elsefalse
.
-
setSupportsBackChannelUserCodeParam
Sets the support for theuser_code
CIBA request parameter. Corresponds to thebackchannel_user_code_parameter
metadata field.- Parameters:
backChannelUserCodeParam
-true
if theuser_code
parameter is supported, elsefalse
.
-
getClientRegistrationTypes
Gets the supported OpenID Connect Federation 1.0 client registration types. Corresponds to theclient_registration_types
metadata field.- Returns:
- The supported registration types,
null
if not specified.
-
setClientRegistrationTypes
Sets the supported OpenID Connect Federation 1.0 client registration types. Corresponds to theclient_registration_types
metadata field.- Parameters:
regTypes
- The supported registration types,null
if not specified.
-
getOrganizationName
Gets the organisation name in OpenID Connect Federation 1.0. Corresponds to theorganization_name
metadata field.- Returns:
- The organisation name,
null
if not specified.
-
setOrganizationName
Sets the organisation name in OpenID Connect Federation 1.0. Corresponds to theorganization_name
metadata field.- Parameters:
organizationName
- The organisation name,null
if not specified.
-
getCustomField
Gets the specified custom metadata field.- Parameters:
name
- The field name. Must not benull
.- Returns:
- The field value, typically serialisable to a JSON entity,
null
if none.
-
getCustomFields
Gets the custom metadata fields.- Returns:
- The custom metadata fields, as a JSON object, empty object if none.
-
setCustomField
Sets the specified custom metadata field.- Parameters:
name
- The field name. Must not benull
.value
- The field value. Should serialise to a JSON entity.
-
setCustomFields
Sets the custom metadata fields.- Parameters:
customFields
- The custom metadata fields, as a JSON object, empty object if none. Must not benull
.
-
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", unless the grant type is "implicit" only.
- The encryption method for JWT-encoded authorisation
responses defaults to
A128CBC-HS256
if a JWE algorithm is set.
- The response types default to
-
toJSONObject
Returns the JSON object representation of this client metadata, including any custom fields.- Returns:
- The JSON object.
-
toJSONObject
Returns the JSON object representation of this client metadata.- Parameters:
includeCustomFields
-true
to include any custom metadata fields,false
to omit them.- Returns:
- The JSON object.
-
toString
-
parse
Parses a client metadata instance from the specified JSON object.- Parameters:
jsonObject
- The JSON object to parse. Must not benull
.- Returns:
- The client metadata.
- Throws:
ParseException
- If the JSON object couldn't be parsed to a client metadata instance.
-