public class VerifyOpenIDAuthenticationFilter
extends org.springframework.web.filter.OncePerRequestFilter
Modifier and Type | Field and Description |
---|---|
static String |
AUTHENTICATED_PRINCIPAL_SESSION_KEY |
static String |
ORIGINAL_URL
The session key stored as a
String , is the requested secure url before redirect to the authentication
page. |
Constructor and Description |
---|
VerifyOpenIDAuthenticationFilter() |
Modifier and Type | Method and Description |
---|---|
protected void |
doFilterInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain filterChain)
Verifies the user is authenticated, otherwise redirects them to the login screen
with the ORIGINAL_URL appropriately set to the secure page they were trying to
access.
|
protected String |
getOringinalURL(javax.servlet.http.HttpServletRequest request)
Stores the URL the user was originally requesting.
|
protected boolean |
isAuthenticated(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Checks if a principal is authenticated.
|
doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatch
public static final String ORIGINAL_URL
String
, is the requested secure url before redirect to the authentication
page.public static final String AUTHENTICATED_PRINCIPAL_SESSION_KEY
protected boolean isAuthenticated(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
request
- The HTTP request.response
- The HTTP response.true
if and only if the principal is authenticated, otherwise false
.IOException
- I/O related problems.javax.servlet.ServletException
- Servlet
related problems.protected String getOringinalURL(javax.servlet.http.HttpServletRequest request)
request
- The HTTP request.protected void doFilterInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain) throws javax.servlet.ServletException, IOException
doFilterInternal
in class org.springframework.web.filter.OncePerRequestFilter
request
- HttpServletRequestresponse
- HttpServletResponsefilterChain
- FilterChainjavax.servlet.ServletException
- if an error occurs while processing filter chain or sending a redirect to the login screenIOException
- if an error occurs while processing filter chain or sending a redirect to the login screenCopyright © 2021 Atlassian. All rights reserved.