public class GoogleOAuthClientAuthenticationStrategyDelegate extends AbstractOAuthClientAuthenticationStrategyDelegate
OAuth2AuthenticationToken
from Google to OAuth2UserDetails
. This
implementation overrides the default behavior of #buildUserRegistration to check that email
addresses have been verified before using them for registration.Constructor and Description |
---|
GoogleOAuthClientAuthenticationStrategyDelegate(OAuth2UserDetailsService oAuth2UserDetailsService,
UserRegistrationService<User> registrationService,
AuthRegistrationProperties registrationProperties,
AuthorizedClientService<AuthorizedClient> clientService,
ClientIdentityProviderProperties clientProperties,
com.broadleafcommerce.common.extension.TypeFactory typeFactory,
PasscodeService<PasswordToken,User> passcodeService) |
Modifier and Type | Method and Description |
---|---|
UserRegistration |
buildUserRegistration(org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken authentication,
String clientId,
String username)
Build a
UserRegistration from the authentication token. |
protected String |
getOAuthRegistrationType()
Gets the registration type / client registration id that this delegate handles
|
buildUsername, canHandle, getClientId, getEmail, getName
generateRandomPassword, getAuthorizedClient, getClientProperties, getClientService, getOAuth2UserDetails, getOAuth2UserDetailsService, getPasscodeService, getRegistrationProperties, getRegistrationService, getTypeFactory, getUsername, getUserType, isAutoRegister, registerNewUser
public GoogleOAuthClientAuthenticationStrategyDelegate(OAuth2UserDetailsService oAuth2UserDetailsService, UserRegistrationService<User> registrationService, AuthRegistrationProperties registrationProperties, AuthorizedClientService<AuthorizedClient> clientService, ClientIdentityProviderProperties clientProperties, com.broadleafcommerce.common.extension.TypeFactory typeFactory, PasscodeService<PasswordToken,User> passcodeService)
protected String getOAuthRegistrationType()
AbstractOAuthClientAuthenticationStrategyDelegate
getOAuthRegistrationType
in class AbstractOAuthClientAuthenticationStrategyDelegate
public UserRegistration buildUserRegistration(org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken authentication, String clientId, String username)
AbstractAuthenticationStrategyDelegate
UserRegistration
from the authentication token.buildUserRegistration
in class AbstractAuthenticationStrategyDelegate<org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken>
authentication
- The user's Authentication
.clientId
- The ID of the client authenticated withusername
- The username of the userUserRegistration
for the user.Copyright © 2021. All rights reserved.