public class OAuth2ClientAuthenticationFilter
extends OncePerRequestFilter
Filter
that processes an authentication request for an OAuth 2.0 Client.AuthenticationManager
, OAuth2ClientAuthenticationProvider
, Section 2.3 Client Authentication, Section 3.2.1 Token Endpoint Client AuthenticationConstructor and Description |
---|
OAuth2ClientAuthenticationFilter(AuthenticationManager authenticationManager, RequestMatcher requestMatcher) Constructs an OAuth2ClientAuthenticationFilter using the provided parameters. |
Modifier and Type | Method and Description |
---|---|
protected void | doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) |
void | setAuthenticationConverter(AuthenticationConverter authenticationConverter) Sets the AuthenticationConverter used for converting a HttpServletRequest to an OAuth2ClientAuthenticationToken . |
void | setAuthenticationFailureHandler(AuthenticationFailureHandler authenticationFailureHandler) Sets the AuthenticationFailureHandler used for handling failed authentications. |
void | setAuthenticationSuccessHandler(AuthenticationSuccessHandler authenticationSuccessHandler) Sets the AuthenticationSuccessHandler used for handling successful authentications. |
public OAuth2ClientAuthenticationFilter(AuthenticationManager authenticationManager, RequestMatcher requestMatcher)
OAuth2ClientAuthenticationFilter
using the provided parameters.authenticationManager
- the AuthenticationManager
used for authenticating the clientrequestMatcher
- the RequestMatcher
used for matching against the HttpServletRequest
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException
ServletException
IOException
public final void setAuthenticationConverter(AuthenticationConverter authenticationConverter)
AuthenticationConverter
used for converting a HttpServletRequest
to an OAuth2ClientAuthenticationToken
.authenticationConverter
- used for converting a HttpServletRequest
to an OAuth2ClientAuthenticationToken
public final void setAuthenticationSuccessHandler(AuthenticationSuccessHandler authenticationSuccessHandler)
AuthenticationSuccessHandler
used for handling successful authentications.authenticationSuccessHandler
- the AuthenticationSuccessHandler
used for handling successful authenticationspublic final void setAuthenticationFailureHandler(AuthenticationFailureHandler authenticationFailureHandler)
AuthenticationFailureHandler
used for handling failed authentications.authenticationFailureHandler
- the AuthenticationFailureHandler
used for handling failed authentications