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 Details

    • 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