Class HttpSessionOAuth2AuthorizedClientRepository

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T extends OAuth2AuthorizedClient>
      T
      loadAuthorizedClient​(java.lang.String clientRegistrationId, org.springframework.security.core.Authentication principal, javax.servlet.http.HttpServletRequest request)
      Returns the OAuth2AuthorizedClient associated to the provided client registration identifier and End-User Authentication (Resource Owner) or null if not available.
      void removeAuthorizedClient​(java.lang.String clientRegistrationId, org.springframework.security.core.Authentication principal, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Removes the OAuth2AuthorizedClient associated to the provided client registration identifier and End-User Authentication (Resource Owner).
      void saveAuthorizedClient​(OAuth2AuthorizedClient authorizedClient, org.springframework.security.core.Authentication principal, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Saves the OAuth2AuthorizedClient associating it to the provided End-User Authentication (Resource Owner).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HttpSessionOAuth2AuthorizedClientRepository

        public HttpSessionOAuth2AuthorizedClientRepository()
    • Method Detail

      • loadAuthorizedClient

        public <T extends OAuth2AuthorizedClient> T loadAuthorizedClient​(java.lang.String clientRegistrationId,
                                                                         org.springframework.security.core.Authentication principal,
                                                                         javax.servlet.http.HttpServletRequest request)
        Description copied from interface: OAuth2AuthorizedClientRepository
        Returns the OAuth2AuthorizedClient associated to the provided client registration identifier and End-User Authentication (Resource Owner) or null if not available.
        Specified by:
        loadAuthorizedClient in interface OAuth2AuthorizedClientRepository
        Type Parameters:
        T - a type of OAuth2AuthorizedClient
        Parameters:
        clientRegistrationId - the identifier for the client's registration
        principal - the End-User Authentication (Resource Owner)
        request - the HttpServletRequest
        Returns:
        the OAuth2AuthorizedClient or null if not available
      • saveAuthorizedClient

        public void saveAuthorizedClient​(OAuth2AuthorizedClient authorizedClient,
                                         org.springframework.security.core.Authentication principal,
                                         javax.servlet.http.HttpServletRequest request,
                                         javax.servlet.http.HttpServletResponse response)
        Description copied from interface: OAuth2AuthorizedClientRepository
        Saves the OAuth2AuthorizedClient associating it to the provided End-User Authentication (Resource Owner).
        Specified by:
        saveAuthorizedClient in interface OAuth2AuthorizedClientRepository
        Parameters:
        authorizedClient - the authorized client
        principal - the End-User Authentication (Resource Owner)
        request - the HttpServletRequest
        response - the HttpServletResponse
      • removeAuthorizedClient

        public void removeAuthorizedClient​(java.lang.String clientRegistrationId,
                                           org.springframework.security.core.Authentication principal,
                                           javax.servlet.http.HttpServletRequest request,
                                           javax.servlet.http.HttpServletResponse response)
        Description copied from interface: OAuth2AuthorizedClientRepository
        Removes the OAuth2AuthorizedClient associated to the provided client registration identifier and End-User Authentication (Resource Owner).
        Specified by:
        removeAuthorizedClient in interface OAuth2AuthorizedClientRepository
        Parameters:
        clientRegistrationId - the identifier for the client's registration
        principal - the End-User Authentication (Resource Owner)
        request - the HttpServletRequest
        response - the HttpServletResponse