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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.security.oauth2.core.user.OAuth2User
    loadUser(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      loadUser in interface org.springframework.security.oauth2.client.userinfo.OAuth2UserService<org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest,org.springframework.security.oauth2.core.user.OAuth2User>
      Overrides:
      loadUser in class org.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.