public class CookieTokenService extends AbstractTokenService<GateInToken,String>
Created by The eXo Platform SAS Author : liem.nguyen ncliam@gmail.com Jun 5, 2009
On 2013-01-02 the followig was added by ppalaga@redhat.com:codecsaltedHashService. To
enable this, the following was done:
autologin |- plain-token1 user="user1" password="***" expiration="..." |- plain-token2 user="user2" password="***" expiration="..." `- ...to
autologin |- user1 | |- plain-token1 user="user1" password="***" expiration="..." | |- plain-token2 user="user1" password="***" expiration="..." | `- ... |- user2 | |- plain-token3 user="user2" password="***" expiration="..." | |- plain-token4 user="user2" password="***" expiration="..." | `- ... `- ...
"rememberme" + randomString to userName + '.' + randomString
It should be considered in the future if the password field can be removed altogether from TokenEntry.
| Modifier and Type | Field and Description |
|---|---|
static String |
HASH_SERVICE_INIT_PARAM |
static String |
LIFECYCLE_NAME
.
|
CLEANUP_PERIOD_TIME, DEFAULT_TOKEN_BYTE_LENGTH, delay_time, name, SERVICE_CONFIG, tokenByteLength, validityMillis| Constructor and Description |
|---|
CookieTokenService(org.exoplatform.container.xml.InitParams initParams,
ChromatticManager chromatticManager,
CodecInitializer codecInitializer) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanExpiredTokens() |
String |
createToken(org.gatein.wci.security.Credentials credentials)
Create a token and returns it.
|
protected String |
decodeKey(String stringKey)
Decode a key from its string representation.
|
void |
deleteAll()
Removes all tokens stored in the
TokenContainer. |
GateInToken |
deleteToken(String cookieTokenString) |
void |
deleteTokensOfUser(String user)
The UI should offer a way to delete all existing tokens of the current user.
|
GateInToken |
getToken(String cookieTokenString) |
protected String |
nextTokenId() |
long |
size() |
void |
start() |
getInstance, getName, getPeriodTime, getValidityTime, nextRandom, stop, validateTokenpublic static final String LIFECYCLE_NAME
public static final String HASH_SERVICE_INIT_PARAM
public CookieTokenService(org.exoplatform.container.xml.InitParams initParams,
ChromatticManager chromatticManager,
CodecInitializer codecInitializer)
throws TokenServiceInitializationException
public void start()
start in interface org.picocontainer.Startablestart in class AbstractTokenService<GateInToken,String>public String createToken(org.gatein.wci.security.Credentials credentials)
TokenStorecredentials - the credentialsprotected String nextTokenId()
nextTokenId in class AbstractTokenService<GateInToken,String>public GateInToken getToken(String cookieTokenString)
getToken in class AbstractTokenService<GateInToken,String>public GateInToken deleteToken(String cookieTokenString)
deleteToken in class AbstractTokenService<GateInToken,String>public void deleteTokensOfUser(String user)
user - public void deleteAll()
TokenContainer.public void cleanExpiredTokens()
cleanExpiredTokens in class AbstractTokenService<GateInToken,String>public long size()
size in class AbstractTokenService<GateInToken,String>protected String decodeKey(String stringKey)
AbstractTokenServicedecodeKey in class AbstractTokenService<GateInToken,String>stringKey - the key a s a stringCopyright © 2017 JBoss by Red Hat. All Rights Reserved.