Class JacksonHttpSessionOAuth2AuthorizedClientRepository

  • All Implemented Interfaces:
    org.springframework.security.oauth2.client.web.OAuth2AuthorizedClientRepository

    public class JacksonHttpSessionOAuth2AuthorizedClientRepository
    extends Object
    implements org.springframework.security.oauth2.client.web.OAuth2AuthorizedClientRepository
    An implementation of an OAuth2AuthorizedClientRepository that stores OAuth2AuthorizedClient's in the HttpSession. To make it compatible with different spring versions. Refs: https://github.com/spring-projects/spring-security/issues/9204
    See Also:
    OAuth2AuthorizedClientRepository, OAuth2AuthorizedClient
    • Constructor Detail

      • JacksonHttpSessionOAuth2AuthorizedClientRepository

        public JacksonHttpSessionOAuth2AuthorizedClientRepository()
    • Method Detail

      • loadAuthorizedClient

        public <T extends org.springframework.security.oauth2.client.OAuth2AuthorizedClient> T loadAuthorizedClient​(String clientRegistrationId,
                                                                                                                    org.springframework.security.core.Authentication principal,
                                                                                                                    javax.servlet.http.HttpServletRequest request)
        Specified by:
        loadAuthorizedClient in interface org.springframework.security.oauth2.client.web.OAuth2AuthorizedClientRepository
      • saveAuthorizedClient

        public void saveAuthorizedClient​(org.springframework.security.oauth2.client.OAuth2AuthorizedClient authorizedClient,
                                         org.springframework.security.core.Authentication principal,
                                         javax.servlet.http.HttpServletRequest request,
                                         javax.servlet.http.HttpServletResponse response)
        Specified by:
        saveAuthorizedClient in interface org.springframework.security.oauth2.client.web.OAuth2AuthorizedClientRepository
      • removeAuthorizedClient

        public void removeAuthorizedClient​(String clientRegistrationId,
                                           org.springframework.security.core.Authentication principal,
                                           javax.servlet.http.HttpServletRequest request,
                                           javax.servlet.http.HttpServletResponse response)
        Specified by:
        removeAuthorizedClient in interface org.springframework.security.oauth2.client.web.OAuth2AuthorizedClientRepository