Class InfinispanSingleUseTokenStoreProvider

  • All Implemented Interfaces:
    SingleUseTokenStoreProvider, Provider

    public class InfinispanSingleUseTokenStoreProvider
    extends Object
    implements SingleUseTokenStoreProvider
    TODO: Check if Boolean can be used as single-use cache argument instead of ActionTokenValueEntity. With respect to other single-use cache usecases like "Revoke Refresh Token" . Also with respect to the usage of streams iterating over "actionTokens" cache (check there are no ClassCastExceptions when casting values directly to ActionTokenValueEntity)
    Author:
    Marek Posolda
    • Field Detail

      • logger

        public static final org.jboss.logging.Logger logger
    • Method Detail

      • putIfAbsent

        public boolean putIfAbsent​(String tokenId,
                                   int lifespanInSeconds)
        Description copied from interface: SingleUseTokenStoreProvider
        Will try to put the token into the cache. It will success just if token is not already there.
        Specified by:
        putIfAbsent in interface SingleUseTokenStoreProvider
        lifespanInSeconds - Minimum lifespan for which successfully added token will be kept in the cache.
        Returns:
        true if token was successfully put into the cache. This means that same token wasn't in the cache before
      • close

        public void close()
        Specified by:
        close in interface Provider