Class AggregatedClaims

java.lang.Object
com.nimbusds.openid.connect.sdk.claims.AggregatedClaims

public class AggregatedClaims extends Object
Aggregated OpenID claims set.

Example aggregated claims (included in a UserInfo response):

 {
   "_claim_names"   : { "address"      : "src1",
                        "phone_number" : "src1" },
   "_claim_sources" : { "src1" : { "JWT" : "jwt_header.jwt_part2.jwt_part3" } }
 }
 

Related specifications:

  • OpenID Connect Core 1.0, sections 5.1 and 5.6.2.
  • Constructor Details

    • AggregatedClaims

      public AggregatedClaims(Set<String> names, com.nimbusds.jwt.JWT claimsJWT)
      Creates a new aggregated OpenID claims instance, the claims source identifier is set to a GUUID string.
      Parameters:
      names - The claim names. Must not be null or empty.
      claimsJWT - The claims JWT. Must not be null.
    • AggregatedClaims

      public AggregatedClaims(String sourceID, Set<String> names, com.nimbusds.jwt.JWT claimsJWT)
      Creates a new aggregated OpenID claims instance.
      Parameters:
      sourceID - Identifier for the claims source. Must not be null or empty string.
      names - The claim names. Must not be null or empty.
      claimsJWT - The claims JWT. Must not be null.
  • Method Details

    • getClaimsJWT

      public com.nimbusds.jwt.JWT getClaimsJWT()
      Returns the claims JWT.
      Returns:
      The claims JWT.
    • getSourceID

      public String getSourceID()
      Returns the identifier for this claims source.
      Returns:
      The source identifier.
    • getNames

      public Set<String> getNames()
      Returns the claim names.
      Returns:
      The claim names.