Package app.services.service
Class ExternalProviderUserService
java.lang.Object
org.springframework.security.oauth2.client.userinfo.DefaultOAuth2UserService
app.services.service.ExternalProviderUserService
- All Implemented Interfaces:
org.springframework.security.oauth2.client.userinfo.OAuth2UserService<org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest,org.springframework.security.oauth2.core.user.OAuth2User>
@Service
public class ExternalProviderUserService
extends org.springframework.security.oauth2.client.userinfo.DefaultOAuth2UserService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.oauth2.core.user.OAuth2UserloadUser(org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest oAuth2UserRequest) Overrides the loadUser method from DefaultOAuth2UserService to create an instance of ExternalProviderUser.Methods inherited from class org.springframework.security.oauth2.client.userinfo.DefaultOAuth2UserService
setRequestEntityConverter, setRestOperations
-
Constructor Details
-
ExternalProviderUserService
public ExternalProviderUserService()
-
-
Method Details
-
loadUser
public org.springframework.security.oauth2.core.user.OAuth2User loadUser(org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest oAuth2UserRequest) throws org.springframework.security.oauth2.core.OAuth2AuthenticationException Overrides the loadUser method from DefaultOAuth2UserService to create an instance of ExternalProviderUser. This class extends DefaultOAuth2UserService and is used to handle the user information returned from external providers.- Specified by:
loadUserin interfaceorg.springframework.security.oauth2.client.userinfo.OAuth2UserService<org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest,org.springframework.security.oauth2.core.user.OAuth2User> - Overrides:
loadUserin classorg.springframework.security.oauth2.client.userinfo.DefaultOAuth2UserService- Parameters:
oAuth2UserRequest- The OAuth2UserRequest object containing information about the user and the client.- Returns:
- An instance of OAuth2User representing the user information.
- Throws:
org.springframework.security.oauth2.core.OAuth2AuthenticationException- If an error occurs during the user information retrieval process.
-