Package org.keycloak.adapters.jetty.core
Class JettyCookieTokenStore
- java.lang.Object
-
- org.keycloak.adapters.jetty.core.JettyCookieTokenStore
-
- All Implemented Interfaces:
AdapterTokenStore,AdapterSessionStore
public class JettyCookieTokenStore extends Object implements AdapterTokenStore
Handle storage of token info in cookie. Per-request object.- Author:
- Marek Posolda
-
-
Constructor Summary
Constructors Constructor Description JettyCookieTokenStore(org.eclipse.jetty.server.Request request, HttpFacade facade, KeycloakDeployment deployment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckCurrentToken()protected KeycloakPrincipal<RefreshableKeycloakSecurityContext>checkPrincipalFromCookie()Verify if we already have authenticated and active principal in cookie.booleanisCached(RequestAuthenticator authenticator)voidlogout()voidrefreshCallback(RefreshableKeycloakSecurityContext secContext)booleanrestoreRequest()voidsaveAccountInfo(OidcKeycloakAccount account)voidsaveRequest()
-
-
-
Constructor Detail
-
JettyCookieTokenStore
public JettyCookieTokenStore(org.eclipse.jetty.server.Request request, HttpFacade facade, KeycloakDeployment deployment)
-
-
Method Detail
-
checkCurrentToken
public void checkCurrentToken()
- Specified by:
checkCurrentTokenin interfaceAdapterTokenStore
-
isCached
public boolean isCached(RequestAuthenticator authenticator)
- Specified by:
isCachedin interfaceAdapterTokenStore
-
saveAccountInfo
public void saveAccountInfo(OidcKeycloakAccount account)
- Specified by:
saveAccountInfoin interfaceAdapterTokenStore
-
logout
public void logout()
- Specified by:
logoutin interfaceAdapterTokenStore
-
refreshCallback
public void refreshCallback(RefreshableKeycloakSecurityContext secContext)
- Specified by:
refreshCallbackin interfaceAdapterTokenStore
-
checkPrincipalFromCookie
protected KeycloakPrincipal<RefreshableKeycloakSecurityContext> checkPrincipalFromCookie()
Verify if we already have authenticated and active principal in cookie. Perform refresh if it's not active- Returns:
- valid principal
-
saveRequest
public void saveRequest()
- Specified by:
saveRequestin interfaceAdapterSessionStore
-
restoreRequest
public boolean restoreRequest()
- Specified by:
restoreRequestin interfaceAdapterSessionStore
-
-