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
public class OIDCScopeValue extends Scope.Value
Standard OpenID Connect scope value.Related specifications:
- OpenID Connect Core 1.0, section 5.2.
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.nimbusds.oauth2.sdk.Scope.Value
Scope.Value.Requirement
-
-
Field Summary
Fields Modifier and Type Field Description static OIDCScopeValueADDRESSRequests that access toaddressclaim at the UserInfo endpoint be granted by the issued access token.static OIDCScopeValueEMAILRequests that access to theemailandemail_verifiedclaims at the UserInfo endpoint be granted by the issued access token.static OIDCScopeValueOFFLINE_ACCESSRequests 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 OIDCScopeValueOPENIDInforms the authorisation server that the client is making an OpenID Connect request (REQUIRED).static OIDCScopeValuePHONERequests that access to thephone_numberandphone_number_verifiedclaims at the UserInfo endpoint be granted by the issued access token.static OIDCScopeValuePROFILERequests 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>getClaimNames()Returns the names of the associated claims.Set<ClaimsRequest.Entry>toClaimsRequestEntries()Gets the claims request entries for this OpenID Connect scope value.net.minidev.json.JSONObjecttoClaimsRequestJSONObject()Gets the claims request JSON object 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 Detail
-
OPENID
public static final OIDCScopeValue OPENID
Informs the authorisation server that the client is making an OpenID Connect request (REQUIRED). This scope value requests access to thesubclaim.
-
PROFILE
public static final OIDCScopeValue 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
public static final OIDCScopeValue EMAIL
Requests that access to theemailandemail_verifiedclaims at the UserInfo endpoint be granted by the issued access token.
-
ADDRESS
public static final OIDCScopeValue ADDRESS
Requests that access toaddressclaim at the UserInfo endpoint be granted by the issued access token.
-
PHONE
public static final OIDCScopeValue PHONE
Requests that access to thephone_numberandphone_number_verifiedclaims at the UserInfo endpoint be granted by the issued access token.
-
OFFLINE_ACCESS
public static final OIDCScopeValue 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 Detail
-
values
public static OIDCScopeValue[] values()
Returns the standard OpenID Connect scope values declared in this class.- Returns:
- The standard OpenID Connect scope values.
-
getClaimNames
public Set<String> getClaimNames()
Returns the names of the associated claims.- Returns:
- The names of the associated claims,
nullif not applicable.
-
toClaimsRequestJSONObject
public net.minidev.json.JSONObject toClaimsRequestJSONObject()
Gets the claims request JSON object for this OpenID Connect scope value.See OpenID Connect Core 1.0, section 5.1.
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,
nullif not applicable.
-
toClaimsRequestEntries
public Set<ClaimsRequest.Entry> toClaimsRequestEntries()
Gets the claims request entries for this OpenID Connect scope value.See OpenID Connect Core 1.0, section 5.1.
- Returns:
- The claims request entries,
nullif not applicable (for scope valuesOPENIDandOFFLINE_ACCESS).
-
-