Class PresetClaims
- java.lang.Object
-
- com.nimbusds.openid.connect.provider.spi.grants.PresetClaims
-
public final class PresetClaims extends Object
Additional or preset OpenID Connect claims. These may be included in the ID token or in the UserInfo response.
-
-
Constructor Summary
Constructors Constructor Description PresetClaims()Creates a new empty preset claims instance.PresetClaims(net.minidev.json.JSONObject idTokenClaims, net.minidev.json.JSONObject userInfoClaims)Creates a new preset claims instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description net.minidev.json.JSONObjectgetPresetIDTokenClaims()Returns the additional or preset claims to be included in the ID token.net.minidev.json.JSONObjectgetPresetUserInfoClaims()Returns the additional or preset claims to be returned in the UserInfo response.booleanisEmpty()Returnstrueif there are no preset claims specified.static PresetClaimsparse(net.minidev.json.JSONObject o)Parses a preset claims representation from the specified JSON object.net.minidev.json.JSONObjecttoJSONObject()Returns a JSON object representation of this preset claims instance.StringtoString()
-
-
-
Constructor Detail
-
PresetClaims
public PresetClaims()
Creates a new empty preset claims instance.
-
PresetClaims
public PresetClaims(net.minidev.json.JSONObject idTokenClaims, net.minidev.json.JSONObject userInfoClaims)
Creates a new preset claims instance.- Parameters:
idTokenClaims- Additional or preset claims to be included in the ID token,nullif none.userInfoClaims- Additional or preset claims to be included in the UserInfo response,nullif none.
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
Returnstrueif there are no preset claims specified.- Returns:
trueif there are no preset claims specified, elsefalse.
-
getPresetIDTokenClaims
public net.minidev.json.JSONObject getPresetIDTokenClaims()
Returns the additional or preset claims to be included in the ID token.- Returns:
- The preset ID token claims,
nullif none.
-
getPresetUserInfoClaims
public net.minidev.json.JSONObject getPresetUserInfoClaims()
Returns the additional or preset claims to be returned in the UserInfo response.- Returns:
- The preset UserInfo claims,
nullif none.
-
toJSONObject
public net.minidev.json.JSONObject toJSONObject()
Returns a JSON object representation of this preset claims instance.- Returns:
- The JSON object.
-
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.
-
-