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 TypeMethodDescriptionbooleancanHandle(@NonNull org.springframework.security.core.Authentication authentication) Check if the given Authentication is anOAuth2AuthenticationTokenand the registration id matchesAbstractOAuthClientAuthenticationStrategyDelegate.getOAuthRegistrationType()protected StringGets the registration type / client registration id that this delegate handlesMethods inherited from class com.broadleafcommerce.auth.client.web.authentication.session.AbstractOAuthClientAuthenticationStrategyDelegate
buildUsername, getClientId, getEmail, getNameMethods inherited from class com.broadleafcommerce.auth.user.web.authentication.session.AbstractAuthenticationStrategyDelegate
buildUserRegistration, generateRandomPassword, getAuthorizedClient, getClientProperties, getClientService, getOAuth2UserDetails, getOAuth2UserDetailsService, getPasswordGenerator, getRegistrationProperties, getRegistrationService, getTypeFactory, getUsername, getUserType, isAutoRegister, registerNewUser 
- 
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) Description copied from class:AbstractOAuthClientAuthenticationStrategyDelegateCheck if the given Authentication is anOAuth2AuthenticationTokenand the registration id matchesAbstractOAuthClientAuthenticationStrategyDelegate.getOAuthRegistrationType()- Specified by:
 canHandlein interfaceAuthenticationStrategyDelegate- Overrides:
 canHandlein classAbstractOAuthClientAuthenticationStrategyDelegate- Parameters:
 authentication- The authentication token- Returns:
 - Whether this delegate can map the token to an OAuth2UserDetails
 
 - 
getOAuthRegistrationType
Description copied from class:AbstractOAuthClientAuthenticationStrategyDelegateGets the registration type / client registration id that this delegate handles- Specified by:
 getOAuthRegistrationTypein classAbstractOAuthClientAuthenticationStrategyDelegate- Returns:
 - supported registration type
 
 
 -