public class UndertowSessionTokenStore extends Object implements AdapterTokenStore
Modifier and Type | Field and Description |
---|---|
protected static org.jboss.logging.Logger |
log |
Constructor and Description |
---|
UndertowSessionTokenStore(io.undertow.server.HttpServerExchange exchange,
KeycloakDeployment deployment,
UndertowUserSessionManagement sessionManagement,
io.undertow.security.api.SecurityContext securityContext) |
Modifier and Type | Method and Description |
---|---|
void |
checkCurrentToken()
Impl can validate if current token exists and perform refreshing if it exists and is expired
|
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 securityContext)
Callback invoked after successful token refresh
|
boolean |
restoreRequest() |
void |
saveAccountInfo(KeycloakAccount account)
Finish successful OAuth2 login and store validated account
|
void |
saveRequest() |
public UndertowSessionTokenStore(io.undertow.server.HttpServerExchange exchange, KeycloakDeployment deployment, UndertowUserSessionManagement sessionManagement, io.undertow.security.api.SecurityContext securityContext)
public void checkCurrentToken()
AdapterTokenStore
checkCurrentToken
in interface AdapterTokenStore
public boolean isCached(RequestAuthenticator authenticator)
AdapterTokenStore
isCached
in interface AdapterTokenStore
authenticator
- used for actual request authenticationpublic void saveRequest()
saveRequest
in interface AdapterTokenStore
public boolean restoreRequest()
restoreRequest
in interface AdapterTokenStore
public void saveAccountInfo(KeycloakAccount account)
AdapterTokenStore
saveAccountInfo
in interface AdapterTokenStore
public void logout()
AdapterTokenStore
logout
in interface AdapterTokenStore
public void refreshCallback(RefreshableKeycloakSecurityContext securityContext)
AdapterTokenStore
refreshCallback
in interface AdapterTokenStore
securityContext
- context where refresh was performedCopyright © 2015. All rights reserved.