@Immutable public static class ClaimsRequest.Entry extends java.lang.Object
Related specifications:
| Constructor and Description |
|---|
Entry(java.lang.String claimName,
ClaimRequirement requirement)
Creates a new individual claim request.
|
Entry(java.lang.String claimName,
ClaimRequirement requirement,
com.nimbusds.langtag.LangTag langTag,
java.util.List<java.lang.String> values)
Creates a new individual claim request.
|
Entry(java.lang.String claimName,
ClaimRequirement requirement,
com.nimbusds.langtag.LangTag langTag,
java.lang.String value)
Creates a new individual claim request.
|
Entry(java.lang.String claimName,
com.nimbusds.langtag.LangTag langTag)
Creates a new individual claim request.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getClaimName()
Gets the claim name.
|
java.lang.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.
|
java.lang.String |
getValue()
Gets the optional value for the claim.
|
java.util.List<java.lang.String> |
getValues()
Gets the optional values for the claim.
|
static java.util.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(java.util.Collection<ClaimsRequest.Entry> entries)
Returns the JSON object representation of the specified
collection of individual claim requests.
|
public Entry(java.lang.String claimName, com.nimbusds.langtag.LangTag langTag)
claimName - The claim name. Must not be null.langTag - Optional language tag for the claim.public Entry(java.lang.String claimName, ClaimRequirement requirement)
claimName - The claim name. Must not be null.requirement - The claim requirement. Must not be
null.public Entry(java.lang.String claimName, ClaimRequirement requirement, com.nimbusds.langtag.LangTag langTag, java.lang.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(java.lang.String claimName, ClaimRequirement requirement, com.nimbusds.langtag.LangTag langTag, java.util.List<java.lang.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 java.lang.String getClaimName()
public java.lang.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 java.lang.String getValue()
null if not specified.public java.util.List<java.lang.String> getValues()
null if not specified.public static net.minidev.json.JSONObject toJSONObject(java.util.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 java.util.Collection<ClaimsRequest.Entry> parseEntries(net.minidev.json.JSONObject jsonObject)
Copyright © 2016 Connect2id Ltd.. All Rights Reserved.