Class DistributedClaims
- java.lang.Object
-
- com.nimbusds.openid.connect.sdk.claims.DistributedClaims
-
public class DistributedClaims extends Object
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, sections 5.1 and 5.6.2.
-
-
Constructor Summary
Constructors Constructor Description DistributedClaims(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessToken
getAccessToken()
Returns the access token for retrieving the claims at the source endpoint.Set<String>
getNames()
Returns the claim names.URI
getSourceEndpoint()
Returns the claims source endpoint.String
getSourceID()
Returns the identifier for this claims source.
-
-
-
Constructor Detail
-
DistributedClaims
public 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.- 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 Detail
-
getSourceEndpoint
public URI getSourceEndpoint()
Returns the claims source endpoint.- Returns:
- The claims source endpoint.
-
getAccessToken
public AccessToken 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
public String getSourceID()
Returns the identifier for this claims source.- Returns:
- The source identifier.
-
-