@Immutable public static class ClaimsRequest.Entry extends Object
Related specifications:
| Constructor | Description |
|---|---|
Entry(String claimName,
com.nimbusds.langtag.LangTag langTag) |
Creates a new individual claim request.
|
Entry(String claimName,
ClaimRequirement requirement) |
Creates a new individual claim request.
|
Entry(String claimName,
ClaimRequirement requirement,
com.nimbusds.langtag.LangTag langTag,
String value) |
Creates a new individual claim request.
|
Entry(String claimName,
ClaimRequirement requirement,
com.nimbusds.langtag.LangTag langTag,
List<String> values) |
Creates a new individual claim request.
|
| Modifier and Type | Method | Description |
|---|---|---|
String |
getClaimName() |
Gets the claim name.
|
String |
getClaimName(boolean withLangTag) |
Gets the claim name, optionally with the language tag
appended.
|
ClaimRequirement |
getClaimRequirement() |
Gets the claim requirement.
|
com.nimbusds.langtag.LangTag |
getLangTag() |
Gets the optional language tag for the claim.
|
String |
getValue() |
Gets the optional value for the claim.
|
List<String> |
getValues() |
Gets the optional values for the claim.
|
static Collection<ClaimsRequest.Entry> |
parseEntries(net.minidev.json.JSONObject jsonObject) |
Parses a collection of individual claim requests from the
specified JSON object.
|
static net.minidev.json.JSONObject |
toJSONObject(Collection<ClaimsRequest.Entry> entries) |
Returns the JSON object representation of the specified
collection of individual claim requests.
|
public Entry(String claimName, com.nimbusds.langtag.LangTag langTag)
claimName - The claim name. Must not be null.langTag - Optional language tag for the claim.public Entry(String claimName, ClaimRequirement requirement)
claimName - The claim name. Must not be null.requirement - The claim requirement. Must not be
null.public Entry(String claimName, ClaimRequirement requirement, com.nimbusds.langtag.LangTag langTag, String value)
claimName - The claim name. Must not be null.requirement - The claim requirement. Must not be
null.langTag - Optional language tag for the claim.value - Optional expected value for the claim.public Entry(String claimName, ClaimRequirement requirement, com.nimbusds.langtag.LangTag langTag, List<String> values)
claimName - The claim name. Must not be null.requirement - The claim requirement. Must not be
null.langTag - Optional language tag for the claim.values - Optional expected values for the claim.public String getClaimName()
public String getClaimName(boolean withLangTag)
Example with language tag:
name#de-DE
withLangTag - If true the language tag will be
appended to the name (if any), else not.public ClaimRequirement getClaimRequirement()
public com.nimbusds.langtag.LangTag getLangTag()
null if not specified.public String getValue()
null if not specified.public List<String> getValues()
null if not specified.public static net.minidev.json.JSONObject toJSONObject(Collection<ClaimsRequest.Entry> entries)
Example:
{
"given_name": {"essential": true},
"nickname": null,
"email": {"essential": true},
"email_verified": {"essential": true},
"picture": null,
"http://example.info/claims/groups": null
}
entries - The entries to serialise. Must not be
null.public static Collection<ClaimsRequest.Entry> parseEntries(net.minidev.json.JSONObject jsonObject)
jsonObject - The JSON object to parse. Must not be
null.Copyright © 2018 Connect2id Ltd.. All rights reserved.