Package org.keycloak.adapters
Interface AdapterTokenStore
-
- All Superinterfaces:
AdapterSessionStore
public interface AdapterTokenStore extends AdapterSessionStore
Abstraction for storing token info on adapter side. Intended to be per-request object- Author:
- Marek Posolda
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
checkCurrentToken()
Impl can validate if current token exists and perform refreshing if it exists and is expiredboolean
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 Keycloakvoid
refreshCallback(RefreshableKeycloakSecurityContext securityContext)
Callback invoked after successful token refreshvoid
saveAccountInfo(OidcKeycloakAccount account)
Finish successful OAuth2 login and store validated account-
Methods inherited from interface org.keycloak.adapters.spi.AdapterSessionStore
restoreRequest, saveRequest
-
-
-
-
Method Detail
-
checkCurrentToken
void checkCurrentToken()
Impl can validate if current token exists and perform refreshing if it exists and is expired
-
isCached
boolean isCached(RequestAuthenticator authenticator)
Check if we are logged already (we have already valid and successfully refreshed accessToken). Establish security context if yes- Parameters:
authenticator
- used for actual request authentication- Returns:
- true if we are logged-in already
-
saveAccountInfo
void saveAccountInfo(OidcKeycloakAccount account)
Finish successful OAuth2 login and store validated account- Parameters:
account
-
-
logout
void logout()
Handle logout on store side and possibly propagate logout call to Keycloak
-
refreshCallback
void refreshCallback(RefreshableKeycloakSecurityContext securityContext)
Callback invoked after successful token refresh- Parameters:
securityContext
- context where refresh was performed
-
-