Package com.nimbusds.openid.connect.sdk
Class OIDCScopeValue
java.lang.Object
com.nimbusds.oauth2.sdk.id.Identifier
com.nimbusds.oauth2.sdk.Scope.Value
com.nimbusds.openid.connect.sdk.OIDCScopeValue
- All Implemented Interfaces:
Serializable
,Comparable<Identifier>
,net.minidev.json.JSONAware
Standard OpenID Connect scope value.
Related specifications:
- OpenID Connect Core 1.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.nimbusds.oauth2.sdk.Scope.Value
Scope.Value.Requirement
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final OIDCScopeValue
Requests that access toaddress
claim at the UserInfo endpoint be granted by the issued access token.static final OIDCScopeValue
Requests that access to theemail
andemail_verified
claims at the UserInfo endpoint be granted by the issued access token.static final OIDCScopeValue
Requests that an OAuth 2.0 refresh token be issued that can be used to obtain an access token that grants access the end-user's UserInfo endpoint even when the user is not present (not logged in).static final OIDCScopeValue
Informs the authorisation server that the client is making an OpenID Connect request (REQUIRED).static final OIDCScopeValue
Requests that access to thephone_number
andphone_number_verified
claims at the UserInfo endpoint be granted by the issued access token.static final OIDCScopeValue
Requests that access to the end-user's default profile claims at the UserInfo endpoint be granted by the issued access token.Fields inherited from class com.nimbusds.oauth2.sdk.id.Identifier
DEFAULT_BYTE_LENGTH, secureRandom
-
Method Summary
Modifier and TypeMethodDescriptionReturns the names of the associated claims.resolveClaimNames
(Scope scope) Resolves the claim names for all scope values that expand to claims.resolveClaimNames
(Scope scope, Map<Scope.Value, Set<String>> customClaims) Resolves the claim names for all scope values that expand to claims.Deprecated.net.minidev.json.JSONObject
Gets the claims request JSON object for this OpenID Connect scope value.Gets the OpenID claims request entries for this OpenID Connect scope value.static OIDCScopeValue[]
values()
Returns the standard OpenID Connect scope values declared in this class.Methods inherited from class com.nimbusds.oauth2.sdk.Scope.Value
equals, getRequirement
Methods inherited from class com.nimbusds.oauth2.sdk.id.Identifier
compareTo, getValue, hashCode, toJSONString, toString, toStringList
-
Field Details
-
OPENID
Informs the authorisation server that the client is making an OpenID Connect request (REQUIRED). This scope value requests access to thesub
claim. -
PROFILE
Requests that access to the end-user's default profile claims at the UserInfo endpoint be granted by the issued access token. These claims are:name
,family_name
,given_name
,middle_name
,nickname
,preferred_username
,profile
,picture
,website
,gender
,birthdate
,zoneinfo
,locale
, andupdated_at
. -
EMAIL
Requests that access to theemail
andemail_verified
claims at the UserInfo endpoint be granted by the issued access token. -
ADDRESS
Requests that access toaddress
claim at the UserInfo endpoint be granted by the issued access token. -
PHONE
Requests that access to thephone_number
andphone_number_verified
claims at the UserInfo endpoint be granted by the issued access token. -
OFFLINE_ACCESS
Requests that an OAuth 2.0 refresh token be issued that can be used to obtain an access token that grants access the end-user's UserInfo endpoint even when the user is not present (not logged in).
-
-
Method Details
-
values
Returns the standard OpenID Connect scope values declared in this class.- Returns:
- The standard OpenID Connect scope values.
-
resolveClaimNames
Resolves the claim names for all scope values that expand to claims. Recognises all standard OpenID Connect scope values as well as any that are additionally specified in the optional map.- Parameters:
scope
- The scope,null
if not specified.- Returns:
- The resolved claim names, as an unmodifiable set, empty set if none.
-
resolveClaimNames
Resolves the claim names for all scope values that expand to claims. Recognises all standard OpenID Connect scope values as well as any that are additionally specified in the optional map.- Parameters:
scope
- The scope,null
if not specified.customClaims
- Custom scope value to set of claim names map,null
if not specified.- Returns:
- The resolved claim names, as an unmodifiable set, empty set if none.
-
getClaimNames
Returns the names of the associated claims.- Returns:
- The names of the associated claims,
null
if not applicable.
-
toClaimsRequestJSONObject
Gets the claims request JSON object for this OpenID Connect scope value.See OpenID Connect Core 1.0
Example JSON object for "openid" scope value:
{ "sub" : { "essential" : true } }
Example JSON object for "email" scope value:
{ "email" : null, "email_verified" : null }
- Returns:
- The claims request JSON object,
null
if not applicable.
-
toClaimsRequestEntries
Deprecated.Gets the claims request entries for this OpenID Connect scope value.See OpenID Connect Core 1.0
- Returns:
- The claims request entries,
null
if not applicable (for scope valuesOPENID
andOFFLINE_ACCESS
). - See Also:
-
toClaimsSetRequestEntries
Gets the OpenID claims request entries for this OpenID Connect scope value.See OpenID Connect Core 1.0
- Returns:
- The OpenID claims request entries,
null
if not applicable (for scope valuesOPENID
andOFFLINE_ACCESS
).
-