use of com.moon.admin.vo.Token in project moon by gentoo111.
the class EhCacheTokenManager method saveToken.
@Override
public Token saveToken(UsernamePasswordToken usernamePasswordToken) {
Cache cache = cacheManager.getCacheManager().getCache("login_user_tokens");
String key = UUID.randomUUID().toString();
Element element = new Element(key, usernamePasswordToken);
element.setTimeToLive(expireSeconds);
cache.put(element);
return new Token(key, DateUtils.addSeconds(new Date(), expireSeconds));
}
Aggregations