Class RefreshTokenClaimsSet


  • public final class RefreshTokenClaimsSet
    extends TokenClaimsSet
    Class wrapping claims set for refresh token.
    • Field Detail

      • log

        @Nonnull
        private org.slf4j.Logger log
        Class logger.
    • Constructor Detail

      • RefreshTokenClaimsSet

        public RefreshTokenClaimsSet​(@Nonnull
                                     TokenClaimsSet tokenClaimsSet,
                                     @Nonnull
                                     Instant iat,
                                     @Nonnull
                                     Instant exp)
        Constructor for refresh token claims set when derived from authz code.
        Parameters:
        tokenClaimsSet - Authorize Code / Refresh Token this token is based on. Must not be NULL.
        iat - Issue time of the token. Must not be NULL.
        exp - Expiration time of the token. Must not be NULL.
        Throws:
        RuntimeException - if called with non allowed null parameters
      • RefreshTokenClaimsSet

        private RefreshTokenClaimsSet​(com.nimbusds.jwt.JWTClaimsSet refreshTokenClaimsSet)
        Private constructor for the parser.
        Parameters:
        refreshTokenClaimsSet - refresh token claims set
    • Method Detail

      • parse

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

        public static RefreshTokenClaimsSet parse​(@Nonnull
                                                  String wrappedAccessToken,
                                                  @Nonnull
                                                  net.shibboleth.utilities.java.support.security.DataSealer dataSealer)
                                           throws ParseException,
                                                  net.shibboleth.utilities.java.support.security.DataSealerException
        Parses refresh token from sealed refresh token.
        Parameters:
        wrappedAccessToken - wrapped refresh token
        dataSealer - sealer to unwrap the refresh token
        Returns:
        refresh token claims set.
        Throws:
        ParseException - is thrown if unwrapped refresh token is not understood
        net.shibboleth.utilities.java.support.security.DataSealerException - is thrown if unwrapping fails