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 IdmIdentityService
idmIdentityService
protected Duration
maxAge
protected long
maxUserSize
protected SecureRandom
random
-
Constructor Summary
Constructors Constructor Description PersistentTokenServiceImpl(IdmIdentityService idmIdentityService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
Token
createToken(String userId, String remoteAddress, String userAgent)
void
delete(Token token)
Duration
getMaxAge()
long
getMaxUserSize()
Token
getToken(String tokenId)
Token
invalidateCacheEntryAndGetToken(String tokenId, boolean invalidateCacheEntry)
protected Token
loadTokenFromDb(String tokenId)
void
setMaxAge(Duration maxAge)
void
setMaxUserSize(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:
afterPropertiesSet
in interfaceInitializingBean
-
delete
@Transactional public void delete(Token token)
- Specified by:
delete
in interfacePersistentTokenService
-
getToken
@Transactional(readOnly=true) public Token getToken(String tokenId)
- Specified by:
getToken
in interfacePersistentTokenService
-
invalidateCacheEntryAndGetToken
@Transactional(readOnly=true) public Token invalidateCacheEntryAndGetToken(String tokenId, boolean invalidateCacheEntry)
- Specified by:
invalidateCacheEntryAndGetToken
in interfacePersistentTokenService
-
createToken
public Token createToken(String userId, String remoteAddress, String userAgent)
- Specified by:
createToken
in interfacePersistentTokenService
-
getMaxUserSize
public long getMaxUserSize()
-
setMaxUserSize
public void setMaxUserSize(long maxUserSize)
-
getMaxAge
public Duration getMaxAge()
-
setMaxAge
public void setMaxAge(Duration maxAge)
-
-