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 Summary
Modifier and TypeMethodDescriptiondefault booleancanHandle(org.springframework.security.core.Authentication authentication) Deprecated, for removal: This API element is subject to removal in a future version.booleancanHandle(org.springframework.security.core.Authentication authentication, AuthorizedClient client) Determine if this delegate can map the given Authentication token to an OAuth2UserDetailsdefault OAuth2UserDetailsgetOAuth2UserDetails(org.springframework.security.core.Authentication authentication) Deprecated.getOAuth2UserDetails(org.springframework.security.core.Authentication authentication, AuthorizedClient client) Map the Authentication token to an OAuth2UserDetailsdefault booleandefault boolean
-
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 tokenclient- 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) Deprecated.Map the Authentication token to an OAuth2UserDetails- Parameters:
authentication- The authentication token- Returns:
OAuth2UserDetailsfor the givenauthenticationtoken
-
getOAuth2UserDetails
OAuth2UserDetails getOAuth2UserDetails(org.springframework.security.core.Authentication authentication, @Nullable AuthorizedClient client) Map the Authentication token to an OAuth2UserDetails- Parameters:
authentication- The authentication tokenclient- The authorized client- Returns:
OAuth2UserDetailsfor the givenauthenticationtoken
-
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
-
canHandle(Authentication, AuthorizedClient)