public class HttpHeaderAuthenticationFilter
extends org.springframework.web.filter.GenericFilterBean
| Constructor and Description |
|---|
HttpHeaderAuthenticationFilter(org.springframework.security.authentication.AuthenticationManager authenticationManager,
ApplicationUserBuilder applicationUserBuilder) |
| Modifier and Type | Method and Description |
|---|---|
void |
doFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
Perform pre-authentication processing.
|
void |
doHttpFilter(javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
Perform pre-authentication processing for Http Servlets.
|
protected Date |
getExistingSessionInitTime()
Gets the existing session init time.
|
protected ApplicationUser |
getExistingUser()
Gets the existing user.
|
protected String |
getExistingUserId()
Gets the existing user Id.
|
protected void |
invalidateUser(javax.servlet.http.HttpServletRequest servletRequest,
boolean invalidateSession)
Invalidates a user by invalidating their session and removing them from the security context holder.
|
protected void |
processUserNotLoggedIn(javax.servlet.http.HttpServletRequest servletRequest)
Perform processing when the user is not logged in.
|
protected void |
successfulAuthentication(org.springframework.security.core.Authentication authResult)
Puts the
Authentication instance returned by the authentication manager into the secure context. |
protected void |
unsuccessfulAuthentication(javax.servlet.http.HttpServletRequest servletRequest,
org.springframework.security.core.AuthenticationException authenticationException)
Ensures the authentication object in the secure context is set to null when authentication fails.
|
public HttpHeaderAuthenticationFilter(org.springframework.security.authentication.AuthenticationManager authenticationManager,
ApplicationUserBuilder applicationUserBuilder)
public void doFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
throws IOException,
javax.servlet.ServletException
servletRequest - the servlet request.servletResponse - the servlet response.filterChain - the filter chain.IOException - if an IO exception was encountered.javax.servlet.ServletException - if a servlet exception was encountered.public void doHttpFilter(javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
throws IOException,
javax.servlet.ServletException
servletRequest - the servlet request.servletResponse - the servlet response.filterChain - the filter chain.IOException - when an exception is thrown executing the next filter in chain.javax.servlet.ServletException - if a servlet exception was encountered.protected void processUserNotLoggedIn(javax.servlet.http.HttpServletRequest servletRequest)
servletRequest - the servlet request.protected void invalidateUser(javax.servlet.http.HttpServletRequest servletRequest,
boolean invalidateSession)
servletRequest - the servlet request.invalidateSession - flag to indicate whether the Http Session should be invalidated or not.protected String getExistingUserId()
protected Date getExistingSessionInitTime()
protected ApplicationUser getExistingUser()
protected void successfulAuthentication(org.springframework.security.core.Authentication authResult)
Authentication instance returned by the authentication manager into the secure context.authResult - the authorization result.protected void unsuccessfulAuthentication(javax.servlet.http.HttpServletRequest servletRequest,
org.springframework.security.core.AuthenticationException authenticationException)
servletRequest - the servlet request.authenticationException - the authentication exception.Copyright © 2021. All rights reserved.