Class VerifiedClaimsSetRequest
- java.lang.Object
-
- com.nimbusds.openid.connect.sdk.claims.ClaimsSetRequest
-
- com.nimbusds.openid.connect.sdk.assurance.request.VerifiedClaimsSetRequest
-
- All Implemented Interfaces:
net.minidev.json.JSONAware
@Immutable public class VerifiedClaimsSetRequest extends ClaimsSetRequest
OpenID Connect verified claims set request, intended to represent theverified_claims
sub-element within auserinfo
orid_token
element in aclaims
request parameter.Example:
{ "verification": { "trust_framework": "eidas_ial" }, "claims":{ "given_name": null, "family_name": null, "birthdate": null } }
Related specifications:
- OpenID Connect Core 1.0, section 5.5.
- OpenID Connect for Identity Assurance 1.0, section 6.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.nimbusds.openid.connect.sdk.claims.ClaimsSetRequest
ClaimsSetRequest.Entry
-
-
Constructor Summary
Constructors Constructor Description VerifiedClaimsSetRequest()
Creates a new OpenID Connect verified claims set request specifying the defaultminimal verification
and no claims.VerifiedClaimsSetRequest(Collection<ClaimsSetRequest.Entry> entries, VerificationSpec verification)
Creates a new OpenID Connect verified claims set request.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description VerifiedClaimsSetRequest
add(ClaimsSetRequest.Entry entry)
Adds the specified claim to the request.VerifiedClaimsSetRequest
add(String claimName)
Adds the specified claim to the request, using default settings.VerifiedClaimsSetRequest
delete(String claimName)
Deletes the specified claim from this request, in all existing language tag variations if any.VerifiedClaimsSetRequest
delete(String claimName, com.nimbusds.langtag.LangTag langTag)
Deletes the specified claim from this request.VerificationSpec
getVerification()
Gets theverification
element.static VerifiedClaimsSetRequest
parse(String json)
Parses an OpenID Connect verified claims set request from the specified JSON object string representation.static VerifiedClaimsSetRequest
parse(net.minidev.json.JSONObject jsonObject)
Parses an OpenID Connect verified claims set request from the specified JSON object representation.net.minidev.json.JSONObject
toJSONObject()
Returns the JSON object representation of this verified claims set request.VerifiedClaimsSetRequest
withVerification(VerificationSpec verification)
Sets theverification
element.-
Methods inherited from class com.nimbusds.openid.connect.sdk.claims.ClaimsSetRequest
get, get, getClaimNames, getEntries, toJSONString, toString
-
-
-
-
Constructor Detail
-
VerifiedClaimsSetRequest
public VerifiedClaimsSetRequest()
Creates a new OpenID Connect verified claims set request specifying the defaultminimal verification
and no claims.
-
VerifiedClaimsSetRequest
public VerifiedClaimsSetRequest(Collection<ClaimsSetRequest.Entry> entries, VerificationSpec verification)
Creates a new OpenID Connect verified claims set request.- Parameters:
entries
- The requested entries. Must not benull
.verification
- Theverification
element. Must not benull
.
-
-
Method Detail
-
getVerification
public VerificationSpec getVerification()
Gets theverification
element.- Returns:
- The
verification
element,null
if not specified.
-
withVerification
public VerifiedClaimsSetRequest withVerification(VerificationSpec verification)
Sets theverification
element.- Parameters:
verification
- Theverification
element. Must not benull
.- Returns:
- The updated verified claims set request.
-
add
public VerifiedClaimsSetRequest add(String claimName)
Description copied from class:ClaimsSetRequest
Adds the specified claim to the request, using default settings. Shorthand forClaimsSetRequest.add(Entry)
.- Overrides:
add
in classClaimsSetRequest
- Parameters:
claimName
- The claim name. Must not benull
.- Returns:
- The updated claims set request.
-
add
public VerifiedClaimsSetRequest add(ClaimsSetRequest.Entry entry)
Description copied from class:ClaimsSetRequest
Adds the specified claim to the request.- Overrides:
add
in classClaimsSetRequest
- Parameters:
entry
- The individual claim request. Must not benull
.- Returns:
- The updated claims set request.
-
delete
public VerifiedClaimsSetRequest delete(String claimName, com.nimbusds.langtag.LangTag langTag)
Description copied from class:ClaimsSetRequest
Deletes the specified claim from this request.- Overrides:
delete
in classClaimsSetRequest
- Parameters:
claimName
- The claim name. Must not benull
.langTag
- The associated language tag,null
if none.- Returns:
- The updated claims set request.
-
delete
public VerifiedClaimsSetRequest delete(String claimName)
Description copied from class:ClaimsSetRequest
Deletes the specified claim from this request, in all existing language tag variations if any.- Overrides:
delete
in classClaimsSetRequest
- Parameters:
claimName
- The claim name. Must not benull
.- Returns:
- The updated claims set request.
-
toJSONObject
public net.minidev.json.JSONObject toJSONObject()
Returns the JSON object representation of this verified claims set request.Example:
{ "verification": { "trust_framework": "eidas" }, "claims":{ "given_name": null, "family_name": null, "birthdate": null } }
- Overrides:
toJSONObject
in classClaimsSetRequest
- Returns:
- The JSON object.
-
parse
public static VerifiedClaimsSetRequest parse(net.minidev.json.JSONObject jsonObject) throws ParseException
Parses an OpenID Connect verified claims set request from the specified JSON object representation.Example:
{ "verification": { "trust_framework": "eidas" }, "claims":{ "given_name": null, "family_name": null, "birthdate": null } }
- Parameters:
jsonObject
- The JSON object to parse. Must not benull
.- Returns:
- The verified claims set request.
- Throws:
ParseException
- If parsing failed.
-
parse
public static VerifiedClaimsSetRequest parse(String json) throws ParseException
Parses an OpenID Connect verified claims set request from the specified JSON object string representation.Example:
{ "verification": { "trust_framework": "eidas" }, "claims":{ "given_name": null, "family_name": null, "birthdate": null } }
- Parameters:
json
- The JSON object string to parse. Must not benull
.- Returns:
- The verified claims set request.
- Throws:
ParseException
- If parsing failed.
-
-