public class CatalinaCookieTokenStore extends Object implements AdapterTokenStore
| Constructor and Description |
|---|
CatalinaCookieTokenStore(org.apache.catalina.connector.Request request,
HttpFacade facade,
KeycloakDeployment deployment) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkCurrentToken()
Impl can validate if current token exists and perform refreshing if it exists and is expired
|
protected KeycloakPrincipal<RefreshableKeycloakSecurityContext> |
checkPrincipalFromCookie()
Verify if we already have authenticated and active principal in cookie.
|
boolean |
isCached(RequestAuthenticator authenticator)
Check if we are logged already (we have already valid and successfully refreshed accessToken).
|
void |
logout()
Handle logout on store side and possibly propagate logout call to Keycloak
|
void |
refreshCallback(RefreshableKeycloakSecurityContext secContext)
Callback invoked after successful token refresh
|
void |
saveAccountInfo(KeycloakAccount account)
Finish successful OAuth2 login and store validated account
|
public CatalinaCookieTokenStore(org.apache.catalina.connector.Request request,
HttpFacade facade,
KeycloakDeployment deployment)
public void checkCurrentToken()
AdapterTokenStorecheckCurrentToken in interface AdapterTokenStorepublic boolean isCached(RequestAuthenticator authenticator)
AdapterTokenStoreisCached in interface AdapterTokenStoreauthenticator - used for actual request authenticationpublic void saveAccountInfo(KeycloakAccount account)
AdapterTokenStoresaveAccountInfo in interface AdapterTokenStorepublic void logout()
AdapterTokenStorelogout in interface AdapterTokenStorepublic void refreshCallback(RefreshableKeycloakSecurityContext secContext)
AdapterTokenStorerefreshCallback in interface AdapterTokenStoresecContext - context where refresh was performedprotected KeycloakPrincipal<RefreshableKeycloakSecurityContext> checkPrincipalFromCookie()
Copyright © 2014. All Rights Reserved.