public class ClientMetadata extends Object
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:
Constructor and Description |
---|
ClientMetadata()
Creates a new OAuth 2.0 client metadata instance.
|
ClientMetadata(ClientMetadata metadata)
Creates a shallow copy of the specified OAuth 2.0 client metadata
instance.
|
Modifier and Type | Method and Description |
---|---|
void |
applyDefaults()
Applies the client metadata defaults where no values have been
specified.
|
List<javax.mail.internet.InternetAddress> |
getContacts()
Gets the administrator contacts for the client.
|
Set<GrantType> |
getGrantTypes()
Gets the expected OAuth 2.0 grant types.
|
URL |
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.
|
URL |
getLogoURI()
Gets the client application logo.
|
URL |
getLogoURI(com.nimbusds.langtag.LangTag langTag)
Gets the client application logo.
|
Map<com.nimbusds.langtag.LangTag,URL> |
getLogoURIEntries()
Gets the client application logo entries.
|
String |
getName()
Gets the client name.
|
String |
getName(com.nimbusds.langtag.LangTag langTag)
Gets the client name.
|
Map<com.nimbusds.langtag.LangTag,String> |
getNameEntries()
Gets the client name entries.
|
URL |
getPolicyURI()
Gets the client policy for use of end-user data.
|
URL |
getPolicyURI(com.nimbusds.langtag.LangTag langTag)
Gets the client policy for use of end-user data.
|
Map<com.nimbusds.langtag.LangTag,URL> |
getPolicyURIEntries()
Gets the client policy entries for use of end-user data.
|
Set<URL> |
getRedirectURIs()
Gets the redirect URIs for this client.
|
Set<ResponseType> |
getResponseTypes()
Gets the expected OAuth 2.0 response types.
|
Scope |
getScope()
Gets the scope values that the client can use when requesting access
tokens.
|
URL |
getTermsOfServiceURI()
Gets the client's terms of service.
|
URL |
getTermsOfServiceURI(com.nimbusds.langtag.LangTag langTag)
Gets the client's terms of service.
|
Map<com.nimbusds.langtag.LangTag,URL> |
getTermsOfServiceURIEntries()
Gets the client's terms of service entries.
|
ClientAuthenticationMethod |
getTokenEndpointAuthMethod()
Gets the Token endpoint authentication method.
|
URL |
getURI()
Gets the client home page.
|
URL |
getURI(com.nimbusds.langtag.LangTag langTag)
Gets the client home page.
|
Map<com.nimbusds.langtag.LangTag,URL> |
getURIEntries()
Gets the client home page entries.
|
static ClientMetadata |
parse(net.minidev.json.JSONObject jsonObject)
Parses an client metadata instance from the specified JSON object.
|
void |
setContacts(List<javax.mail.internet.InternetAddress> contacts)
Sets the administrator contacts for the client.
|
void |
setGrantTypes(Set<GrantType> grantTypes)
Sets the expected OAuth 2.0 grant types.
|
void |
setJWKSetURL(URL 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(URL logoURI)
Sets the client application logo.
|
void |
setLogoURI(URL logoURI,
com.nimbusds.langtag.LangTag langTag)
Sets the client application logo.
|
void |
setName(String name)
Sets the client name.
|
void |
setName(String name,
com.nimbusds.langtag.LangTag langTag)
Sets the client name.
|
void |
setPolicyURI(URL policyURI)
Sets the client policy for use of end-user data.
|
void |
setPolicyURI(URL policyURI,
com.nimbusds.langtag.LangTag langTag)
Sets the client policy for use of end-user data.
|
void |
setRedirectURIs(Set<URL> redirectURIs)
Sets the redirect URIs for this client.
|
void |
setResponseTypes(Set<ResponseType> responseTypes)
Sets the expected OAuth 2.0 response types.
|
void |
setScope(Scope scope)
Sets the scope values that the client can use when requesting access
tokens.
|
void |
setTermsOfServiceURI(URL tosURI)
Sets the client's terms of service.
|
void |
setTermsOfServiceURI(URL tosURI,
com.nimbusds.langtag.LangTag langTag)
Sets the client's terms of service.
|
void |
setTokenEndpointAuthMethod(ClientAuthenticationMethod authMethod)
Sets the Token endpoint authentication method.
|
void |
setURI(URL uri)
Sets the client home page.
|
void |
setURI(URL uri,
com.nimbusds.langtag.LangTag langTag)
Sets the client home page.
|
net.minidev.json.JSONObject |
toJSONObject()
Returns the JSON object representation of this client metadata.
|
public ClientMetadata()
public ClientMetadata(ClientMetadata metadata)
metadata
- The client metadata to copy. Must not be
null
.public Set<URL> getRedirectURIs()
redirect_uris
client metadata field.null
if not specified.public void setRedirectURIs(Set<URL> redirectURIs)
redirect_uris
client metadata field.redirectURIs
- The redirect URIs, null
if not
specified.public Scope getScope()
scope
client metadata field.null
if not specified.public void setScope(Scope scope)
scope
client metadata field.scope
- The scope, null
if not specified.public Set<ResponseType> getResponseTypes()
response_types
client metadata field.null
if not specified.public void setResponseTypes(Set<ResponseType> responseTypes)
response_types
client metadata field.responseTypes
- The response types, null
if not
specified.public Set<GrantType> getGrantTypes()
grant_types
client metadata field.null
if not specified.public void setGrantTypes(Set<GrantType> grantTypes)
grant_types
client metadata field.grantTypes
- The grant types, null
if not specified.public List<javax.mail.internet.InternetAddress> getContacts()
contacts
client metadata field.null
if not specified.public void setContacts(List<javax.mail.internet.InternetAddress> contacts)
contacts
client metadata field.contacts
- The administrator contacts, null
if not
specified.public String getName()
client_name
client
metadata field, with no language tag.null
if not specified.public String getName(com.nimbusds.langtag.LangTag langTag)
client_name
client
metadata field, with an optional language tag.langTag
- The language tag of the entry, null
to get
the non-tagged entry.null
if not specified.public Map<com.nimbusds.langtag.LangTag,String> getNameEntries()
client_name
client metadata field.public void setName(String name)
client_name
client
metadata field, with no language tag.name
- The client name, null
if not specified.public void setName(String name, com.nimbusds.langtag.LangTag langTag)
client_name
client
metadata field, with an optional language tag.name
- The client name. Must not be null
.langTag
- The language tag, null
if not specified.public URL getLogoURI()
logo_uri
client metadata field, with no language
tag.null
if not specified.public URL getLogoURI(com.nimbusds.langtag.LangTag langTag)
logo_uri
client metadata field, with an optional
language tag.null
if not specified.public Map<com.nimbusds.langtag.LangTag,URL> getLogoURIEntries()
logo_uri
client metadata field.public void setLogoURI(URL logoURI)
logo_uri
client metadata field, with no language
tag.logoURI
- The logo URI, null
if not specified.public void setLogoURI(URL logoURI, com.nimbusds.langtag.LangTag langTag)
logo_uri
client metadata field, with an optional
language tag.logoURI
- The logo URI. Must not be null
.langTag
- The language tag, null
if not specified.public URL getURI()
client_uri
client metadata field, with no language tag.null
if not specified.public URL getURI(com.nimbusds.langtag.LangTag langTag)
client_uri
client metadata field, with an optional language tag.null
if not specified.public Map<com.nimbusds.langtag.LangTag,URL> getURIEntries()
client_uri
client metadata field.public void setURI(URL uri)
client_uri
client metadata field, with no language tag.uri
- The client URI, null
if not specified.public void setURI(URL uri, com.nimbusds.langtag.LangTag langTag)
client_uri
client metadata field, with an optional language tag.uri
- The URI. Must not be null
.langTag
- The language tag, null
if not specified.public URL getPolicyURI()
policy_uri
client metadata field, with no language
tag.null
if not specified.public URL getPolicyURI(com.nimbusds.langtag.LangTag langTag)
policy_url
client metadata field, with an optional
language tag.null
if not specified.public Map<com.nimbusds.langtag.LangTag,URL> getPolicyURIEntries()
policy_uri
client metadata field.public void setPolicyURI(URL policyURI)
policy_uri
client metadata field, with no language
tag.policyURI
- The policy URI, null
if not specified.public void setPolicyURI(URL policyURI, com.nimbusds.langtag.LangTag langTag)
policy_uri
client metadata field, with an optional
language tag.policyURI
- The policy URI. Must not be null
.langTag
- The language tag, null
if not specified.public URL getTermsOfServiceURI()
tos_uri
client metadata field, with no language
tag.null
if not specified.public URL getTermsOfServiceURI(com.nimbusds.langtag.LangTag langTag)
tos_uri
client metadata field, with an optional
language tag.null
if not specified.public Map<com.nimbusds.langtag.LangTag,URL> getTermsOfServiceURIEntries()
tos_uri
client metadata field.public void setTermsOfServiceURI(URL tosURI)
tos_uri
client metadata field, with no language
tag.tosURI
- The terms of service URI, null
if not
specified.public void setTermsOfServiceURI(URL tosURI, com.nimbusds.langtag.LangTag langTag)
tos_uri
client metadata field, with an optional
language tag.tosURI
- The terms of service URI. Must not be null
.langTag
- The language tag, null
if not specified.public ClientAuthenticationMethod getTokenEndpointAuthMethod()
token_endpoint_auth_method
client metadata field.null
if
not specified.public void setTokenEndpointAuthMethod(ClientAuthenticationMethod authMethod)
token_endpoint_auth_method
client metadata field.authMethod
- The Token endpoint authentication method,
null
if not specified.public URL getJWKSetURI()
jwks_uri
client
metadata field.null
if not specified.public void setJWKSetURL(URL jwkSetURI)
jwks_uri
client
metadata field.jwkSetURI
- The JWK set URI, null
if not specified.public void applyDefaults()
["code"]
.
"authorization_code".
public net.minidev.json.JSONObject toJSONObject()
public static ClientMetadata parse(net.minidev.json.JSONObject jsonObject) throws ParseException
jsonObject
- The JSON object to parse. Must not be
null
.ParseException
- If the JSON object couldn't be parsed to a
client metadata instance.Copyright © 2013 NimbusDS. All Rights Reserved.