Class PersistentTokenServiceImpl
java.lang.Object
com.flowable.core.spring.security.token.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
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)
-
Field Details
-
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 Details
-
PersistentTokenServiceImpl
public PersistentTokenServiceImpl(org.flowable.idm.api.IdmIdentityService idmIdentityService)
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.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 interfacePersistentTokenService
-
getToken
@Transactional(readOnly=true) public org.flowable.idm.api.Token getToken(java.lang.String tokenId)- Specified by:
getToken
in interfacePersistentTokenService
-
invalidateCacheEntryAndGetToken
@Transactional(readOnly=true) public org.flowable.idm.api.Token invalidateCacheEntryAndGetToken(java.lang.String tokenId, boolean invalidateCacheEntry)- Specified by:
invalidateCacheEntryAndGetToken
in interfacePersistentTokenService
-
createToken
public org.flowable.idm.api.Token createToken(java.lang.String userId, java.lang.String remoteAddress, java.lang.String userAgent)- Specified by:
createToken
in interfacePersistentTokenService
-
getMaxUserSize
public long getMaxUserSize() -
setMaxUserSize
public void setMaxUserSize(long maxUserSize) -
getMaxAge
public java.time.Duration getMaxAge() -
setMaxAge
public void setMaxAge(java.time.Duration maxAge)
-