Added logger and method to remove all tokens relted to a user (usefull for the logout)
This commit is contained in:
parent
59b44aabae
commit
cac9ba8f33
|
@ -4,10 +4,14 @@ import javax.servlet.http.HttpSession;
|
|||
|
||||
import org.gcube.oidc.rest.JWTToken;
|
||||
|
||||
import com.liferay.portal.kernel.log.Log;
|
||||
import com.liferay.portal.kernel.log.LogFactoryUtil;
|
||||
import com.liferay.portal.model.User;
|
||||
|
||||
public abstract class JWTCacheProxy {
|
||||
|
||||
protected static final Log log = LogFactoryUtil.getLog(JWTCacheProxy.class);
|
||||
|
||||
protected static JWTCacheProxy instance;
|
||||
|
||||
public JWTCacheProxy() {
|
||||
|
@ -29,14 +33,14 @@ public abstract class JWTCacheProxy {
|
|||
|
||||
public abstract void removeUMAToken(User user, HttpSession session);
|
||||
|
||||
public abstract void removeAllOIDCTokens(User user);
|
||||
|
||||
public abstract void removeAllUMATokens(User user);
|
||||
|
||||
public abstract void clearOIDCTokens();
|
||||
|
||||
public abstract void clearUMATokens();
|
||||
|
||||
public abstract void clearAllTokens();
|
||||
|
||||
protected String generateKey(User user, HttpSession session) {
|
||||
return user.getScreenName() + "@" + session.getId();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue