Class BasicClaimsSpec
- java.lang.Object
-
- com.nimbusds.openid.connect.provider.spi.grants.BasicClaimsSpec
-
- Direct Known Subclasses:
ClaimsSpec
@Immutable public class BasicClaimsSpec extends Object
Basic OpenID Connect claims specification.
-
-
Constructor Summary
Constructors Constructor Description BasicClaimsSpec()
Creates a new default basic OpenID Connect claims specification (empty).BasicClaimsSpec(Set<String> names)
Creates a new basic OpenID Connect claims specification.BasicClaimsSpec(Set<String> names, PresetClaims presetClaims)
Creates a new basic OpenID Connect claims specification.BasicClaimsSpec(Set<String> names, net.minidev.json.JSONObject data, PresetClaims presetClaims)
Creates a new basic OpenID Connect claims specification.BasicClaimsSpec(Set<String> names, net.minidev.json.JSONObject presetIDTokenClaims, net.minidev.json.JSONObject presetUserInfoClaims)
Creates a new basic OpenID Connect claims specification.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description net.minidev.json.JSONObject
getData()
Returns the optional claims fulfillment data.Set<String>
getNames()
Returns the authorised OpenID Connect claims.PresetClaims
getPresetClaims()
The additional or preset claims to be included in the ID token and UserInfo response.net.minidev.json.JSONObject
getPresetIDTokenClaims()
Returns the additional preset claims to be included in the ID token.net.minidev.json.JSONObject
getPresetUserInfoClaims()
Returns the additional preset claims to be included in the UserInfo response.static BasicClaimsSpec
parse(net.minidev.json.JSONObject o)
Parses a basic OpenID Connect claims specification from the specified JSON object.net.minidev.json.JSONObject
toJSONObject()
Returns a JSON object representation of this basic claims specification.
-
-
-
Constructor Detail
-
BasicClaimsSpec
public BasicClaimsSpec()
Creates a new default basic OpenID Connect claims specification (empty).
-
BasicClaimsSpec
public BasicClaimsSpec(Set<String> names)
Creates a new basic OpenID Connect claims specification.- Parameters:
names
- The names of the authorised OpenID Connect claims,null
if none.
-
BasicClaimsSpec
public BasicClaimsSpec(Set<String> names, net.minidev.json.JSONObject presetIDTokenClaims, net.minidev.json.JSONObject presetUserInfoClaims)
Creates a new basic OpenID Connect claims specification.- Parameters:
names
- The names of the authorised OpenID Connect claims, empty set ornull
if none.presetIDTokenClaims
- Additional preset claims to be included in the ID token,null
if none.presetUserInfoClaims
- Additional preset claims to be included in the UserInfo response,null
if none.
-
BasicClaimsSpec
public BasicClaimsSpec(Set<String> names, PresetClaims presetClaims)
Creates a new basic OpenID Connect claims specification.- Parameters:
names
- The names of the authorised OpenID Connect claims, empty set ornull
if none.presetClaims
- The additional or preset claims to be included in the ID token and UserInfo response,null
if none.
-
BasicClaimsSpec
public BasicClaimsSpec(Set<String> names, net.minidev.json.JSONObject data, PresetClaims presetClaims)
Creates a new basic OpenID Connect claims specification.- Parameters:
names
- The names of the authorised OpenID Connect claims, empty set ornull
if none.data
- Optional claims fulfillment data,null
if none.presetClaims
- The additional or preset claims to be included in the ID token and UserInfo response,null
if none.
-
-
Method Detail
-
getNames
public Set<String> getNames()
Returns the authorised OpenID Connect claims.- Returns:
- The names of the authorised OpenID Connect claims, empty set if none.
-
getData
public net.minidev.json.JSONObject getData()
Returns the optional claims fulfillment data.- Returns:
- The claims fulfillment data,
null
if not specified.
-
getPresetClaims
public PresetClaims getPresetClaims()
The additional or preset claims to be included in the ID token and UserInfo response.- Returns:
- The additional or preset claims.
-
getPresetIDTokenClaims
public net.minidev.json.JSONObject getPresetIDTokenClaims()
Returns the additional preset claims to be included in the ID token.- Returns:
- The additional preset claims to be included in the ID token,
null
if none.
-
getPresetUserInfoClaims
public net.minidev.json.JSONObject getPresetUserInfoClaims()
Returns the additional preset claims to be included in the UserInfo response.- Returns:
- The additional or preset claims to be included in the
UserInfo response,
null
if none.
-
toJSONObject
public net.minidev.json.JSONObject toJSONObject()
Returns a JSON object representation of this basic claims specification.- Returns:
- The JSON object.
-
parse
public static BasicClaimsSpec parse(net.minidev.json.JSONObject o) throws com.nimbusds.oauth2.sdk.ParseException
Parses a basic OpenID Connect claims specification from the specified JSON object.- Parameters:
o
- The JSON object. Must not benull
.- Returns:
- The basic OpenID Connect claims specification.
- Throws:
com.nimbusds.oauth2.sdk.ParseException
- If parsing failed.
-
-