Class PersistentTokenServiceImpl
- java.lang.Object
-
- com.flowable.core.spring.security.token.PersistentTokenServiceImpl
-
- All Implemented Interfaces:
PersistentTokenService,InitializingBean
public class PersistentTokenServiceImpl extends Object implements PersistentTokenService, InitializingBean
- Author:
- Joram Barrez, Tijs Rademakers, Filip Hrisafov
-
-
Field Summary
Fields Modifier and Type Field Description protected IdmIdentityServiceidmIdentityServiceprotected DurationmaxAgeprotected longmaxUserSizeprotected SecureRandomrandom
-
Constructor Summary
Constructors Constructor Description PersistentTokenServiceImpl(IdmIdentityService idmIdentityService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()TokencreateToken(String userId, String remoteAddress, String userAgent)voiddelete(Token token)DurationgetMaxAge()longgetMaxUserSize()TokengetToken(String tokenId)TokeninvalidateCacheEntryAndGetToken(String tokenId, boolean invalidateCacheEntry)protected TokenloadTokenFromDb(String tokenId)voidsetMaxAge(Duration maxAge)voidsetMaxUserSize(long maxUserSize)
-
-
-
Field Detail
-
random
protected SecureRandom random
-
idmIdentityService
protected final IdmIdentityService idmIdentityService
-
maxUserSize
protected long maxUserSize
-
maxAge
protected Duration maxAge
-
-
Constructor Detail
-
PersistentTokenServiceImpl
public PersistentTokenServiceImpl(IdmIdentityService idmIdentityService)
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSetin interfaceInitializingBean
-
delete
@Transactional public void delete(Token token)
- Specified by:
deletein interfacePersistentTokenService
-
getToken
@Transactional(readOnly=true) public Token getToken(String tokenId)
- Specified by:
getTokenin interfacePersistentTokenService
-
invalidateCacheEntryAndGetToken
@Transactional(readOnly=true) public Token invalidateCacheEntryAndGetToken(String tokenId, boolean invalidateCacheEntry)
- Specified by:
invalidateCacheEntryAndGetTokenin interfacePersistentTokenService
-
createToken
public Token createToken(String userId, String remoteAddress, String userAgent)
- Specified by:
createTokenin interfacePersistentTokenService
-
getMaxUserSize
public long getMaxUserSize()
-
setMaxUserSize
public void setMaxUserSize(long maxUserSize)
-
getMaxAge
public Duration getMaxAge()
-
setMaxAge
public void setMaxAge(Duration maxAge)
-
-