com.github.houbbbbb.sso.service.UserOpt Maven / Gradle / Ivy
package com.github.houbbbbb.sso.service;
import com.github.houbbbbb.sso.config.SSOFilterCNF;
import com.github.houbbbbb.sso.cons.SSOCON;
import com.github.houbbbbb.sso.util.CookieUtil;
import com.github.houbbbbb.sso.util.DateUtil;
import com.google.gson.JsonObject;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @author : hbw
* @desctiption :
* @date : 2020-05-15 16:20
*/
public class UserOpt {
private SSOFilterCNF ssoFilterCNF;
public UserOpt(SSOFilterCNF ssoFilterCNF){
this.ssoFilterCNF = ssoFilterCNF;
}
public JsonObject getUser(HttpServletRequest request){
String key = SSOCON.SSO_SESSION;
String session = CookieUtil.getCookie(request, key);
return SSOCON.getUserCache(session);
}
}