Class AuthorizeCodeClaimsSet


  • public final class AuthorizeCodeClaimsSet
    extends TokenClaimsSet
    Class wrapping claims set for authorize code.
    • Constructor Detail

      • AuthorizeCodeClaimsSet

        private AuthorizeCodeClaimsSet​(@Nonnull
                                       net.shibboleth.utilities.java.support.security.IdentifierGenerationStrategy idGenerator,
                                       @Nonnull
                                       com.nimbusds.oauth2.sdk.id.ClientID clientID,
                                       @Nonnull
                                       String issuer,
                                       @Nonnull
                                       String userPrincipal,
                                       @Nonnull
                                       String subject,
                                       @Nonnull
                                       com.nimbusds.openid.connect.sdk.claims.ACR acr,
                                       @Nonnull
                                       Instant iat,
                                       @Nonnull
                                       Instant exp,
                                       @Nullable
                                       com.nimbusds.openid.connect.sdk.Nonce nonce,
                                       @Nonnull
                                       Instant authTime,
                                       @Nonnull
                                       URI redirectURI,
                                       @Nonnull
                                       com.nimbusds.oauth2.sdk.Scope scope,
                                       @Nullable
                                       com.nimbusds.openid.connect.sdk.ClaimsRequest claims,
                                       @Nullable
                                       com.nimbusds.openid.connect.sdk.claims.ClaimsSet dlClaims,
                                       @Nullable
                                       com.nimbusds.openid.connect.sdk.claims.ClaimsSet dlClaimsID,
                                       @Nullable
                                       com.nimbusds.openid.connect.sdk.claims.ClaimsSet dlClaimsUI,
                                       @Nullable
                                       net.minidev.json.JSONArray consentableClaims,
                                       @Nullable
                                       net.minidev.json.JSONArray consentedClaims,
                                       @Nullable
                                       String codeChallenge)
        Constructor for authorize code claims set.
        Parameters:
        idGenerator - Generator for pseudo unique identifier for the code. Must not be NULL.
        clientID - Client Id of the rp. Must not be NULL.
        issuer - OP issuer value. Must not be NULL.
        userPrincipal - User Principal of the authenticated user. Must not be NULL.
        subject - Subject of the authenticated user. Must not be NULL
        acr - Authentication context class reference value of the authentication. May be NULL.
        iat - Issue time of the authorize code. Must not be NULL.
        exp - Expiration time of the authorize code. Must not be NULL.
        nonce - Nonce of the authentication request. May be NULL.
        authTime - Authentication time of the user. Must not be NULL.
        redirectURI - Validated redirect URI of the authentication request. Must not be NULL.
        scope - Scope of the authentication request. Must not be NULL.
        claims - Claims request of the authentication request. May be NULL.
        dlClaims - Token delivery claims delivered both for id token and userinfo response. May be NULL.
        dlClaimsID - Token delivery claims delivered for id token. May be NULL.
        dlClaimsUI - Token delivery claims delivered for userinfo response. May be NULL.
        consentableClaims - consentable claims. May be NULL.
        consentedClaims - consented claims. May be NULL.
        codeChallenge - Code Challenge. May be NULL.
        Throws:
        RuntimeException - if called with nonallowed null parameters
      • AuthorizeCodeClaimsSet

        private AuthorizeCodeClaimsSet​(com.nimbusds.jwt.JWTClaimsSet authzCodeClaimsSet)
        Private constructor for the parser.
        Parameters:
        authzCodeClaimsSet - authorize code claims set
    • Method Detail

      • parse

        public static AuthorizeCodeClaimsSet parse​(String authorizeCodeClaimsSet)
                                            throws ParseException
        Parses authz code from string (JSON).
        Parameters:
        authorizeCodeClaimsSet - JSON String representation of the code
        Returns:
        AuthorizeCodeClaimsSet instance if parsing is successful.
        Throws:
        ParseException - if parsing fails for example due to incompatible types.
      • parse

        public static AuthorizeCodeClaimsSet parse​(@Nonnull
                                                   String wrappedAuthCode,
                                                   @Nonnull
                                                   net.shibboleth.utilities.java.support.security.DataSealer dataSealer)
                                            throws ParseException,
                                                   net.shibboleth.utilities.java.support.security.DataSealerException
        Parses authz code from sealed authorization code.
        Parameters:
        wrappedAuthCode - wrapped code
        dataSealer - sealer to unwrap the code
        Returns:
        authorize code
        Throws:
        ParseException - is thrown if unwrapped code is not understood
        net.shibboleth.utilities.java.support.security.DataSealerException - is thrown if unwrapping fails