Class OAuth2AuthorizationRequestRedirectFilter

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAULT_AUTHORIZATION_REQUEST_BASE_URI
      The default base URI used for authorization requests.
      • 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 used for storing OAuth2AuthorizationRequest's.
      void setRequestCache​(RequestCache requestCache)
      Sets the RequestCache used for storing the current request before redirecting the OAuth 2.0 Authorization Request.
      • 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
    • Field Detail

      • DEFAULT_AUTHORIZATION_REQUEST_BASE_URI

        public static final java.lang.String DEFAULT_AUTHORIZATION_REQUEST_BASE_URI
        The default base URI used for authorization requests.
        See Also:
        Constant Field Values
    • Constructor Detail

      • OAuth2AuthorizationRequestRedirectFilter

        public OAuth2AuthorizationRequestRedirectFilter​(ClientRegistrationRepository clientRegistrationRepository)
        Constructs an OAuth2AuthorizationRequestRedirectFilter using the provided parameters.
        Parameters:
        clientRegistrationRepository - the repository of client registrations
      • OAuth2AuthorizationRequestRedirectFilter

        public OAuth2AuthorizationRequestRedirectFilter​(ClientRegistrationRepository clientRegistrationRepository,
                                                        java.lang.String authorizationRequestBaseUri)
        Constructs an OAuth2AuthorizationRequestRedirectFilter using the provided parameters.
        Parameters:
        clientRegistrationRepository - the repository of client registrations
        authorizationRequestBaseUri - the base URI used for authorization requests
      • OAuth2AuthorizationRequestRedirectFilter

        public OAuth2AuthorizationRequestRedirectFilter​(OAuth2AuthorizationRequestResolver authorizationRequestResolver)
        Constructs an OAuth2AuthorizationRequestRedirectFilter using the provided parameters.
        Parameters:
        authorizationRequestResolver - the resolver used for resolving authorization requests
        Since:
        5.1
    • Method Detail

      • setRequestCache

        public final void setRequestCache​(RequestCache requestCache)
        Sets the RequestCache used for storing the current request before redirecting the OAuth 2.0 Authorization Request.
        Parameters:
        requestCache - the cache used for storing the current request
      • 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