public class GithubOAuthClientAuthenticationStrategyDelegate extends AbstractOAuthClientAuthenticationStrategyDelegate
OAuth2AuthenticationToken
from Github to OAuth2UserDetails
. This
implementation overrides the default behavior of #getEmail, since github users can opt out of
sharing their email address.Constructor and Description |
---|
GithubOAuthClientAuthenticationStrategyDelegate(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 |
---|---|
protected String |
getEmail(org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken authentication)
Get the user's email address from the authentication token.
|
protected String |
getOAuthRegistrationType()
Gets the registration type / client registration id that this delegate handles
|
buildUsername, canHandle, getClientId, getName
buildUserRegistration, generateRandomPassword, getAuthorizedClient, getClientProperties, getClientService, getOAuth2UserDetails, getOAuth2UserDetailsService, getPasscodeService, getRegistrationProperties, getRegistrationService, getTypeFactory, getUsername, getUserType, isAutoRegister, registerNewUser
public GithubOAuthClientAuthenticationStrategyDelegate(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
protected String getEmail(org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken authentication)
AbstractAuthenticationStrategyDelegate
getEmail
in class AbstractOAuthClientAuthenticationStrategyDelegate
Copyright © 2021. All rights reserved.