Class DefaultOIDCAuthenticationStrategyDelegate
java.lang.Object
com.broadleafcommerce.auth.user.web.authentication.session.AbstractAuthenticationStrategyDelegate<org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken>
com.broadleafcommerce.auth.client.web.authentication.session.AbstractOAuthClientAuthenticationStrategyDelegate
com.broadleafcommerce.auth.client.web.authentication.session.DefaultOIDCAuthenticationStrategyDelegate
- All Implemented Interfaces:
AuthenticationStrategyDelegate
public class DefaultOIDCAuthenticationStrategyDelegate
extends AbstractOAuthClientAuthenticationStrategyDelegate
Basic implementation that will try to handle any
OAuth2AuthenticationToken
. Marked with
@Order(LOWEST_PRECEDENCE)
to ensure this will always be the last
AuthenticationStrategyDelegate
in the list.- Author:
- Cade Rea (cade-rea)
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultOIDCAuthenticationStrategyDelegate
(OAuth2UserDetailsService oAuth2UserDetailsService, UserRegistrationService<User> registrationService, AuthRegistrationProperties registrationProperties, AuthorizedClientService<AuthorizedClient> clientService, ClientIdentityProviderProperties clientProperties, com.broadleafcommerce.common.extension.TypeFactory typeFactory, PasswordGenerator passwordGenerator) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canHandle
(@NonNull org.springframework.security.core.Authentication authentication, AuthorizedClient authorizedClient) Determine if this delegate can map the given Authentication token to an OAuth2UserDetailsprotected String
Gets the registration type / client registration id that this delegate handlesMethods inherited from class com.broadleafcommerce.auth.client.web.authentication.session.AbstractOAuthClientAuthenticationStrategyDelegate
buildUsername, getClientId, getEmail, getName
Methods inherited from class com.broadleafcommerce.auth.user.web.authentication.session.AbstractAuthenticationStrategyDelegate
buildUserRegistration, createAdminUser, generateRandomPassword, getAuthorizedClient, getClientProperties, getClientService, getExternalAdminUserHandler, getOAuth2UserDetails, getOAuth2UserDetailsService, getPasswordGenerator, getRegistrationProperties, getRegistrationService, getTypeFactory, getUsername, getUserType, handleAdminLogin, isAutoRegister, isAutoRegister, isThirdPartyAuth, registerNewUser, registerNewUser, setExternalAdminUserHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.auth.user.web.authentication.session.AuthenticationStrategyDelegate
canHandle, getOAuth2UserDetails, isAdminClientHandler, isCustomerClientHandler
-
Constructor Details
-
DefaultOIDCAuthenticationStrategyDelegate
public DefaultOIDCAuthenticationStrategyDelegate(OAuth2UserDetailsService oAuth2UserDetailsService, UserRegistrationService<User> registrationService, AuthRegistrationProperties registrationProperties, AuthorizedClientService<AuthorizedClient> clientService, ClientIdentityProviderProperties clientProperties, com.broadleafcommerce.common.extension.TypeFactory typeFactory, PasswordGenerator passwordGenerator)
-
-
Method Details
-
canHandle
public boolean canHandle(@NonNull @NonNull org.springframework.security.core.Authentication authentication, @Nullable AuthorizedClient authorizedClient) Description copied from interface:AuthenticationStrategyDelegate
Determine if this delegate can map the given Authentication token to an OAuth2UserDetails- Specified by:
canHandle
in interfaceAuthenticationStrategyDelegate
- Overrides:
canHandle
in classAbstractOAuthClientAuthenticationStrategyDelegate
- Parameters:
authentication
- The authentication tokenauthorizedClient
- The authorized client- Returns:
- Whether this delegate can map the token to an OAuth2UserDetails
-
getOAuthRegistrationType
Description copied from class:AbstractOAuthClientAuthenticationStrategyDelegate
Gets the registration type / client registration id that this delegate handles- Specified by:
getOAuthRegistrationType
in classAbstractOAuthClientAuthenticationStrategyDelegate
- Returns:
- supported registration type
-