Class DistributedClaims
java.lang.Object
com.nimbusds.openid.connect.sdk.claims.DistributedClaims
Distributed OpenID claims set.
Example distributed claims with an access token (included in a UserInfo response):
{ "_claim_names" : { "credit_score" : "src1" }, "_claim_sources" : { "src1" : { "endpoint" : "https://creditagency.example.com/claims_here", "access_token" : "ksj3n283dke" } } }
Example distributed claims without a specified access token (included in a UserInfo response):
{ "_claim_names" : { "payment_info" : "src2", "shipping_address" : "src2" }, "_claim_sources" : { "src2" : { "endpoint" : "https://bank.example.com/claim_source" } } }
Related specifications:
- OpenID Connect Core 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionDistributedClaims
(String sourceID, Set<String> names, URI sourceEndpoint, AccessToken accessToken) Creates a new aggregated OpenID claims instance.DistributedClaims
(Set<String> names, URI sourceEndpoint, AccessToken accessToken) Creates a new aggregated OpenID claims instance, the claims source identifier is set to a GUUID string. -
Method Summary
Modifier and TypeMethodDescriptionReturns the access token for retrieving the claims at the source endpoint.getNames()
Returns the claim names.Returns the claims source endpoint.Returns the identifier for this claims source.
-
Constructor Details
-
DistributedClaims
Creates a new aggregated OpenID claims instance, the claims source identifier is set to a GUUID string.- Parameters:
names
- The claim names. Must not benull
or empty.sourceEndpoint
- The claims source endpoint. Must not benull
.accessToken
- Access token for retrieving the claims at the source endpoint,null
if not specified.
-
DistributedClaims
public DistributedClaims(String sourceID, Set<String> names, URI sourceEndpoint, AccessToken accessToken) Creates a new aggregated OpenID claims instance.- Parameters:
sourceID
- Identifier for the claims source. Must not benull
or empty string.names
- The claim names. Must not benull
or empty.sourceEndpoint
- The claims source endpoint. Must not benull
.accessToken
- Access token for retrieving the claims at the source endpoint,null
if not specified.
-
-
Method Details
-
getSourceEndpoint
Returns the claims source endpoint.- Returns:
- The claims source endpoint.
-
getAccessToken
Returns the access token for retrieving the claims at the source endpoint.- Returns:
- The access token for retrieving the claims at the source
endpoint,
null
if not specified.
-
getSourceID
Returns the identifier for this claims source.- Returns:
- The source identifier.
-
getNames
Returns the claim names.- Returns:
- The claim names.
-