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 boolean
canHandle
(org.springframework.security.core.Authentication authentication) Deprecated, for removal: This API element is subject to removal in a future version.boolean
canHandle
(org.springframework.security.core.Authentication authentication, AuthorizedClient client) Determine if this delegate can map the given Authentication token to an OAuth2UserDetailsdefault OAuth2UserDetails
getOAuth2UserDetails
(org.springframework.security.core.Authentication authentication) Deprecated.getOAuth2UserDetails
(org.springframework.security.core.Authentication authentication, AuthorizedClient client) Map the Authentication token to an OAuth2UserDetailsdefault boolean
default 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:
OAuth2UserDetails
for the givenauthentication
token
-
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:
OAuth2UserDetails
for the givenauthentication
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
-
canHandle(Authentication, AuthorizedClient)