@Immutable public class ClaimsSpec extends BasicClaimsSpec
Modifier and Type | Field and Description |
---|---|
static ClaimsSpec |
NONE
None (empty) claims specification.
|
Constructor and Description |
---|
ClaimsSpec()
Creates a new default OpenID Connect claims specification (empty).
|
ClaimsSpec(Set<String> names)
Creates a new OpenID Connect claims specification.
|
ClaimsSpec(Set<String> names,
List<com.nimbusds.langtag.LangTag> locales,
net.minidev.json.JSONObject presetIDTokenClaims,
net.minidev.json.JSONObject presetUserInfoClaims,
com.nimbusds.openid.connect.sdk.claims.ClaimsTransport transport)
Creates a new OpenID Connect claims specification.
|
ClaimsSpec(Set<String> names,
List<com.nimbusds.langtag.LangTag> locales,
net.minidev.json.JSONObject data,
net.minidev.json.JSONObject presetIDTokenClaims,
net.minidev.json.JSONObject presetUserInfoClaims,
com.nimbusds.openid.connect.sdk.claims.ClaimsTransport transport)
Creates a new OpenID Connect claims specification.
|
Modifier and Type | Method and Description |
---|---|
List<com.nimbusds.langtag.LangTag> |
getLocales()
Returns the preferred OpenID Connect claims locales.
|
com.nimbusds.openid.connect.sdk.claims.ClaimsTransport |
getTransport()
Returns the preferred claims transport.
|
static ClaimsSpec |
parse(net.minidev.json.JSONObject o)
Parses an OpenID Connect claims specification from the specified
JSON object.
|
net.minidev.json.JSONObject |
toJSONObject()
Returns a JSON object representation of this claims specification.
|
getData, getNames, getPresetClaims, getPresetIDTokenClaims, getPresetUserInfoClaims
public static final ClaimsSpec NONE
public ClaimsSpec()
public ClaimsSpec(Set<String> names)
names
- The names of the authorised OpenID Connect claims,
null
if none.public ClaimsSpec(Set<String> names, List<com.nimbusds.langtag.LangTag> locales, net.minidev.json.JSONObject presetIDTokenClaims, net.minidev.json.JSONObject presetUserInfoClaims, com.nimbusds.openid.connect.sdk.claims.ClaimsTransport transport)
names
- The names of the authorised OpenID
Connect claims, null
if none.locales
- The preferred claims locales,
null
if not specified.presetIDTokenClaims
- Additional or preset claims to be
included in the ID token, null
if none.presetUserInfoClaims
- Additional or preset claims to be
included in the UserInfo response,
null
if none.transport
- The preferred claims transport. Must not
be null
.public ClaimsSpec(Set<String> names, List<com.nimbusds.langtag.LangTag> locales, net.minidev.json.JSONObject data, net.minidev.json.JSONObject presetIDTokenClaims, net.minidev.json.JSONObject presetUserInfoClaims, com.nimbusds.openid.connect.sdk.claims.ClaimsTransport transport)
names
- The names of the authorised OpenID
Connect claims, null
if none.locales
- The preferred claims locales,data
- Optional claims fulfillment data,
null
if not specified.
null
if not specified.presetIDTokenClaims
- Additional or preset claims to be
included in the ID token, null
if none.presetUserInfoClaims
- Additional or preset claims to be
included in the UserInfo response,
null
if none.transport
- The preferred claims transport. Must not
be null
.public List<com.nimbusds.langtag.LangTag> getLocales()
null
if
not specified.public com.nimbusds.openid.connect.sdk.claims.ClaimsTransport getTransport()
public net.minidev.json.JSONObject toJSONObject()
toJSONObject
in class BasicClaimsSpec
public static ClaimsSpec parse(net.minidev.json.JSONObject o) throws com.nimbusds.oauth2.sdk.ParseException
o
- The JSON object. Must not be null
.com.nimbusds.oauth2.sdk.ParseException
- If parsing failed.Copyright © 2021 Connect2id Ltd.. All rights reserved.