Class OAuth2AuthorizationCodeGrantFilter

    • Field Summary

      • Fields inherited from class org.springframework.web.filter.OncePerRequestFilter

        ALREADY_FILTERED_SUFFIX
      • Fields inherited from class org.springframework.web.filter.GenericFilterBean

        logger
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doFilterInternal​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain)  
      void setAuthorizationRequestRepository​(AuthorizationRequestRepository<OAuth2AuthorizationRequest> authorizationRequestRepository)
      Sets the repository for stored OAuth2AuthorizationRequest's.
      void setRequestCache​(RequestCache requestCache)
      Sets the RequestCache used for loading a previously saved request (if available) and replaying it after completing the processing of the OAuth 2.0 Authorization Response.
      • Methods inherited from class org.springframework.web.filter.OncePerRequestFilter

        doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatch
      • Methods inherited from class org.springframework.web.filter.GenericFilterBean

        addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
      • Methods inherited from class java.lang.Object

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

      • OAuth2AuthorizationCodeGrantFilter

        public OAuth2AuthorizationCodeGrantFilter​(ClientRegistrationRepository clientRegistrationRepository,
                                                  OAuth2AuthorizedClientRepository authorizedClientRepository,
                                                  AuthenticationManager authenticationManager)
        Constructs an OAuth2AuthorizationCodeGrantFilter using the provided parameters.
        Parameters:
        clientRegistrationRepository - the repository of client registrations
        authorizedClientRepository - the authorized client repository
        authenticationManager - the authentication manager
    • Method Detail

      • setRequestCache

        public final void setRequestCache​(RequestCache requestCache)
        Sets the RequestCache used for loading a previously saved request (if available) and replaying it after completing the processing of the OAuth 2.0 Authorization Response.
        Parameters:
        requestCache - the cache used for loading a previously saved request (if available)
        Since:
        5.4
      • doFilterInternal

        protected void doFilterInternal​(javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.http.HttpServletResponse response,
                                        javax.servlet.FilterChain filterChain)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException
        Specified by:
        doFilterInternal in class org.springframework.web.filter.OncePerRequestFilter
        Throws:
        javax.servlet.ServletException
        java.io.IOException