Class Claims


  • public final class Claims
    extends Object
    Models OpenID Connect claims that are requested in an authorize request.

    See Claims Parameter in the OIDC specification.

    Instances of this class are immutable.

    • Constructor Detail

      • Claims

        public Claims​(Map<String,​Claim> userInfoClaims,
                      Map<String,​Claim> idTokenClaims)
        Creates a Claims object.
        Parameters:
        userInfoClaims - the userinfo claims, must not be null
        idTokenClaims - the id_token claims, must not be null
      • Claims

        public Claims​(Map<String,​Claim> userInfoClaims,
                      Map<String,​Claim> idTokenClaims,
                      Map<String,​Claim> customClaims)
        Creates a Claims object.
        Parameters:
        userInfoClaims - the userinfo claims, must not be null
        idTokenClaims - the id_token claims, must not be null
        customClaims - the custom claims, must not be null
    • Method Detail

      • getUserInfoClaims

        public Map<String,​Claim> getUserInfoClaims()
        Gets the userinfo claims as an unmodifiable map.
        Returns:
        the userinfo claims
      • getIdTokenClaims

        public Map<String,​Claim> getIdTokenClaims()
        Gets the id_token claims as an unmodifiable map.
        Returns:
        the id_token claims
      • getCustomClaims

        public Map<String,​Claim> getCustomClaims()
        Gets the custom claims as an unmodifiable map.
        Returns:
        the custom claims
      • getAllClaims

        public Map<String,​Claim> getAllClaims()
        Gets all the claims for userinfo, id_token and custom claims, as an unmodifiable map.
        Returns:
        all claims
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object