public final class BearerTokenAuthenticationFilter
extends org.springframework.web.filter.OncePerRequestFilter
AuthenticationManager that can authenticate a
BearerTokenAuthenticationToken.JwtAuthenticationProvider| Constructor and Description |
|---|
BearerTokenAuthenticationFilter(org.springframework.security.authentication.AuthenticationManager authenticationManager)
Construct a
BearerTokenAuthenticationFilter using the provided parameter(s) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doFilterInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain filterChain)
Extract any Bearer Token from
the request and attempt an authentication.
|
void |
setAuthenticationEntryPoint(org.springframework.security.web.AuthenticationEntryPoint authenticationEntryPoint)
Set the
AuthenticationEntryPoint to use. |
void |
setBearerTokenResolver(BearerTokenResolver bearerTokenResolver)
Set the
BearerTokenResolver to use. |
doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatchpublic BearerTokenAuthenticationFilter(org.springframework.security.authentication.AuthenticationManager authenticationManager)
BearerTokenAuthenticationFilter using the provided parameter(s)authenticationManager - protected void doFilterInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain filterChain)
throws javax.servlet.ServletException,
java.io.IOException
doFilterInternal in class org.springframework.web.filter.OncePerRequestFilterrequest - response - filterChain - javax.servlet.ServletExceptionjava.io.IOExceptionpublic final void setBearerTokenResolver(BearerTokenResolver bearerTokenResolver)
BearerTokenResolver to use. Defaults to DefaultBearerTokenResolver.bearerTokenResolver - the BearerTokenResolver to usepublic final void setAuthenticationEntryPoint(org.springframework.security.web.AuthenticationEntryPoint authenticationEntryPoint)
AuthenticationEntryPoint to use. Defaults to BearerTokenAuthenticationEntryPoint.authenticationEntryPoint - the AuthenticationEntryPoint to use