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.IdmIdentityServiceidmIdentityServiceprotected java.time.DurationmaxAgeprotected longmaxUserSizeprotected java.security.SecureRandomrandom -
Constructor Summary
Constructors Constructor Description PersistentTokenServiceImpl(org.flowable.idm.api.IdmIdentityService idmIdentityService) -
Method Summary
Modifier and Type Method Description voidafterPropertiesSet()org.flowable.idm.api.TokencreateToken(java.lang.String userId, java.lang.String remoteAddress, java.lang.String userAgent)voiddelete(org.flowable.idm.api.Token token)java.time.DurationgetMaxAge()longgetMaxUserSize()org.flowable.idm.api.TokengetToken(java.lang.String tokenId)org.flowable.idm.api.TokeninvalidateCacheEntryAndGetToken(java.lang.String tokenId, boolean invalidateCacheEntry)protected org.flowable.idm.api.TokenloadTokenFromDb(java.lang.String tokenId)voidsetMaxAge(java.time.Duration maxAge)voidsetMaxUserSize(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:
afterPropertiesSetin 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:
deletein interfacePersistentTokenService
-
getToken
@Transactional(readOnly=true) public org.flowable.idm.api.Token getToken(java.lang.String tokenId)- Specified by:
getTokenin interfacePersistentTokenService
-
invalidateCacheEntryAndGetToken
@Transactional(readOnly=true) public org.flowable.idm.api.Token invalidateCacheEntryAndGetToken(java.lang.String tokenId, boolean invalidateCacheEntry)- Specified by:
invalidateCacheEntryAndGetTokenin interfacePersistentTokenService
-
createToken
public org.flowable.idm.api.Token createToken(java.lang.String userId, java.lang.String remoteAddress, java.lang.String userAgent)- Specified by:
createTokenin 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)
-