Class TransientTokenService
java.lang.Object
org.exoplatform.web.security.security.AbstractTokenService<PortalToken,String>
org.exoplatform.web.security.security.PlainTokenService<PortalToken,String>
org.exoplatform.web.security.security.TransientTokenService
- All Implemented Interfaces:
TokenStore,org.picocontainer.Startable
-
Field Summary
FieldsFields inherited from class org.exoplatform.web.security.security.AbstractTokenService
CLEANUP_PERIOD_TIME, DEFAULT_TOKEN_BYTE_LENGTH, delayTime, log, name, SERVICE_CONFIG, tokenByteLength, validityMillis -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateToken(String username) Create a token and returns it.protected StringDecode a key from its string representation.deleteToken(String id) deleteToken(String id, String tokenType) String[]longsize()Methods inherited from class org.exoplatform.web.security.security.PlainTokenService
cleanExpiredTokensMethods inherited from class org.exoplatform.web.security.security.AbstractTokenService
getInstance, getName, getPeriodTime, getValidityTime, nextRandom, nextTokenId, start, stop, validateToken
-
Field Details
-
tokens
-
-
Constructor Details
-
TransientTokenService
public TransientTokenService(org.exoplatform.container.xml.InitParams initParams)
-
-
Method Details
-
createToken
Description copied from interface:TokenStoreCreate a token and returns it. The store state is modified as it retains the token until it is removed either explicitely or because the token validity is expired.- Parameters:
username- the username related to the token- Returns:
- the token key
-
getToken
- Specified by:
getTokenin classAbstractTokenService<PortalToken,String>
-
getToken
- Specified by:
getTokenin classAbstractTokenService<PortalToken,String>
-
decodeKey
Description copied from class:AbstractTokenServiceDecode a key from its string representation.- Specified by:
decodeKeyin classAbstractTokenService<PortalToken,String> - Parameters:
stringKey- the key a s a string- Returns:
- the typed key
-
deleteToken
- Specified by:
deleteTokenin classAbstractTokenService<PortalToken,String>
-
deleteToken
- Specified by:
deleteTokenin classAbstractTokenService<PortalToken,String>
-
getAllTokens
- Specified by:
getAllTokensin classPlainTokenService<PortalToken,String>
-
size
public long size()- Specified by:
sizein classAbstractTokenService<PortalToken,String>
-