Interface AuthenticationStrategyDelegate

All Known Implementing Classes:
AbstractAuthenticationStrategyDelegate, AbstractOAuthClientAuthenticationStrategyDelegate, DefaultOIDCAuthenticationStrategyDelegate, FormLoginAuthenticationStrategyDelegate, GithubOAuthClientAuthenticationStrategyDelegate, GoogleOAuthClientAuthenticationStrategyDelegate, RememberMeLoginAuthenticationStrategyDelegate

public interface AuthenticationStrategyDelegate
Used by the DefaultSessionAuthenticationStrategy to convert Authentication from various sources into OAuth2UserDetails.
Author:
Cade Rea (cade-rea)
  • Method Details

    • canHandle

      @Deprecated(forRemoval=true) default boolean canHandle(org.springframework.security.core.Authentication authentication)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Determine if this delegate can map the given Authentication token to an OAuth2UserDetails
      Parameters:
      authentication - The authentication token
      Returns:
      Whether this delegate can map the token to an OAuth2UserDetails
    • canHandle

      boolean canHandle(org.springframework.security.core.Authentication authentication, @Nullable AuthorizedClient client)
      Determine if this delegate can map the given Authentication token to an OAuth2UserDetails
      Parameters:
      authentication - The authentication token
      client - The authorized client
      Returns:
      Whether this delegate can map the token to an OAuth2UserDetails
    • getOAuth2UserDetails

      @Deprecated default OAuth2UserDetails getOAuth2UserDetails(org.springframework.security.core.Authentication authentication)
      Map the Authentication token to an OAuth2UserDetails
      Parameters:
      authentication - The authentication token
      Returns:
      OAuth2UserDetails for the given authentication token
    • getOAuth2UserDetails

      OAuth2UserDetails getOAuth2UserDetails(org.springframework.security.core.Authentication authentication, @Nullable AuthorizedClient client)
      Map the Authentication token to an OAuth2UserDetails
      Parameters:
      authentication - The authentication token
      client - The authorized client
      Returns:
      OAuth2UserDetails for the given authentication token
    • isAdminClientHandler

      default boolean isAdminClientHandler()
      Returns:
      Does this authentication strategy delegate handle admin users? Default implementation returns true.
    • isCustomerClientHandler

      default boolean isCustomerClientHandler()
      Returns:
      Does this authentication strategy handle customer users? Default implementation returns true