Class JWTTokenProvider

  • All Implemented Interfaces:
    TokenProvider

    public class JWTTokenProvider
    extends Object
    implements TokenProvider
    A TokenProvider implementation that provides a JWT Token.
    • Constructor Detail

      • JWTTokenProvider

        public JWTTokenProvider()
    • Method Detail

      • canHandleToken

        public boolean canHandleToken​(String tokenType)
        Return true if this TokenProvider implementation is capable of providing a token that corresponds to the given TokenType.
        Specified by:
        canHandleToken in interface TokenProvider
      • canHandleToken

        public boolean canHandleToken​(String tokenType,
                                      String realm)
        Return true if this TokenProvider implementation is capable of providing a token that corresponds to the given TokenType in a given realm.
        Specified by:
        canHandleToken in interface TokenProvider
      • isSignToken

        public boolean isSignToken()
        Return whether the provided token will be signed or not. Default is true.
      • setSignToken

        public void setSignToken​(boolean signToken)
        Set whether the provided token will be signed or not. Default is true.
      • setRealmMap

        public void setRealmMap​(Map<String,​? extends RealmProperties> realms)
        Set the map of realm->RealmProperties for this token provider
        Parameters:
        realms - the map of realm->RealmProperties for this token provider
      • getRealmMap

        public Map<String,​RealmProperties> getRealmMap()
        Get the map of realm->RealmProperties for this token provider
        Returns:
        the map of realm->RealmProperties for this token provider
      • setJwtClaimsProvider

        public void setJwtClaimsProvider​(JWTClaimsProvider jwtClaimsProvider)