Commit 8f9de635 by guojuxing

返回token值

parent 776e7612
......@@ -58,7 +58,15 @@ public class UserContext {
return new UserDetail();
}
public void init(UserDetail userDetail){
/**
* 返回token值
* @Title: init

* @Description:

 * @author guojuxing
* @param userDetail

* @return java.lang.String


 */
public String init(UserDetail userDetail){
String uuId = ToolUtil.randomUUID();
String key = Constants.TOKEN_KEY+uuId;
RedisUtil.setCache(key, userDetail, expireLength, TimeUnit.HOURS);
......@@ -68,6 +76,7 @@ public class UserContext {
if(response != null){
response.addCookie(cookie);
}
return uuId;
}
public void refresh(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment