Class PersistentTokenServiceImpl

  • All Implemented Interfaces:
    PersistentTokenService, org.springframework.beans.factory.InitializingBean

    public class PersistentTokenServiceImpl
    extends java.lang.Object
    implements PersistentTokenService, org.springframework.beans.factory.InitializingBean
    Author:
    Joram Barrez, Tijs Rademakers, Filip Hrisafov
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.flowable.idm.api.IdmIdentityService idmIdentityService  
      protected java.time.Duration maxAge  
      protected long maxUserSize  
      protected java.security.SecureRandom random  
    • Constructor Summary

      Constructors 
      Constructor Description
      PersistentTokenServiceImpl​(org.flowable.idm.api.IdmIdentityService idmIdentityService)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterPropertiesSet()  
      org.flowable.idm.api.Token createToken​(java.lang.String userId, java.lang.String remoteAddress, java.lang.String userAgent)  
      void delete​(org.flowable.idm.api.Token token)  
      java.time.Duration getMaxAge()  
      long getMaxUserSize()  
      org.flowable.idm.api.Token getToken​(java.lang.String tokenId)  
      org.flowable.idm.api.Token invalidateCacheEntryAndGetToken​(java.lang.String tokenId, boolean invalidateCacheEntry)  
      protected org.flowable.idm.api.Token loadTokenFromDb​(java.lang.String tokenId)  
      void setMaxAge​(java.time.Duration maxAge)  
      void setMaxUserSize​(long maxUserSize)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • random

        protected java.security.SecureRandom random
      • idmIdentityService

        protected final org.flowable.idm.api.IdmIdentityService idmIdentityService
      • maxUserSize

        protected long maxUserSize
      • maxAge

        protected java.time.Duration maxAge
    • Constructor Detail

      • PersistentTokenServiceImpl

        public PersistentTokenServiceImpl​(org.flowable.idm.api.IdmIdentityService idmIdentityService)
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      • loadTokenFromDb

        protected org.flowable.idm.api.Token loadTokenFromDb​(java.lang.String tokenId)
      • delete

        @Transactional
        public void delete​(org.flowable.idm.api.Token token)
        Specified by:
        delete in interface PersistentTokenService
      • getToken

        @Transactional(readOnly=true)
        public org.flowable.idm.api.Token getToken​(java.lang.String tokenId)
        Specified by:
        getToken in interface PersistentTokenService
      • invalidateCacheEntryAndGetToken

        @Transactional(readOnly=true)
        public org.flowable.idm.api.Token invalidateCacheEntryAndGetToken​(java.lang.String tokenId,
                                                                          boolean invalidateCacheEntry)
        Specified by:
        invalidateCacheEntryAndGetToken in interface PersistentTokenService
      • createToken

        public org.flowable.idm.api.Token createToken​(java.lang.String userId,
                                                      java.lang.String remoteAddress,
                                                      java.lang.String userAgent)
        Specified by:
        createToken in interface PersistentTokenService
      • getMaxUserSize

        public long getMaxUserSize()
      • setMaxUserSize

        public void setMaxUserSize​(long maxUserSize)
      • getMaxAge

        public java.time.Duration getMaxAge()
      • setMaxAge

        public void setMaxAge​(java.time.Duration maxAge)