Class PresetClaims
java.lang.Object
com.nimbusds.openid.connect.provider.spi.grants.PresetClaims
Additional or preset OpenID Connect claims. These may be included in the ID
token or in the UserInfo response.
-
Constructor Summary
ConstructorDescriptionCreates a new empty preset claims instance.PresetClaims
(@Nullable net.minidev.json.JSONObject idTokenClaims, @Nullable net.minidev.json.JSONObject userInfoClaims) Creates a new preset claims instance. -
Method Summary
Modifier and TypeMethodDescription@Nullable net.minidev.json.JSONObject
Returns the additional or preset claims to be included in the ID token.@Nullable net.minidev.json.JSONObject
Returns the additional or preset claims to be returned in the UserInfo response.boolean
isEmpty()
Returnstrue
if there are no preset claims specified.static PresetClaims
parse
(net.minidev.json.JSONObject o) Parses a preset claims representation from the specified JSON object.net.minidev.json.JSONObject
Returns a JSON object representation of this preset claims instance.toString()
-
Constructor Details
-
PresetClaims
public PresetClaims()Creates a new empty preset claims instance. -
PresetClaims
public PresetClaims(@Nullable net.minidev.json.JSONObject idTokenClaims, @Nullable net.minidev.json.JSONObject userInfoClaims) Creates a new preset claims instance.- Parameters:
idTokenClaims
- Additional or preset claims to be included in the ID token,null
if none.userInfoClaims
- Additional or preset claims to be included in the UserInfo response,null
if none.
-
-
Method Details
-
isEmpty
Returnstrue
if there are no preset claims specified.- Returns:
true
if there are no preset claims specified, elsefalse
.
-
getPresetIDTokenClaims
Returns the additional or preset claims to be included in the ID token.- Returns:
- The preset ID token claims,
null
if none.
-
getPresetUserInfoClaims
Returns the additional or preset claims to be returned in the UserInfo response.- Returns:
- The preset UserInfo claims,
null
if none.
-
toJSONObject
Returns a JSON object representation of this preset claims instance.- Returns:
- The JSON object.
-
toString
-
parse
public static PresetClaims parse(net.minidev.json.JSONObject o) throws com.nimbusds.oauth2.sdk.ParseException Parses a preset claims representation from the specified JSON object.- Parameters:
o
- The JSON object. Must not benull
.- Returns:
- The preset claims.
- Throws:
com.nimbusds.oauth2.sdk.ParseException
- If parsing failed.
-