public class CrowdSecurityFilter extends Object implements javax.servlet.Filter
web.xml
url-pattern
. If the requesting user does
not have a valid token, they will be redirected to the authentication path specified in the crowd.properties
configuration file. Additional values are stored to the user's session such as their originally requested
URL should their authentication be found invalid.Modifier and Type | Field and Description |
---|---|
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 |
---|
CrowdSecurityFilter(CrowdHttpAuthenticator httpAuthenticator,
AuthenticationUrlProvider authenticationUrlProvider) |
CrowdSecurityFilter(CrowdHttpAuthenticator httpAuthenticator,
ClientProperties clientProperties)
Constructs a CrowdSecurityFilter.
|
Modifier and Type | Method and Description |
---|---|
protected String |
authenticationUrl(javax.servlet.http.HttpServletRequest request)
Override this to alter the destination of the redirect to the authentication page.
|
void |
destroy()
Shuts down the filter.
|
void |
doFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
Executes the filter.
|
void |
init(javax.servlet.FilterConfig filterConfig)
Configures the filter.
|
public static final String ORIGINAL_URL
String
, is the requested secure url before redirect to the authentication
page.public CrowdSecurityFilter(CrowdHttpAuthenticator httpAuthenticator, ClientProperties clientProperties)
httpAuthenticator
- CrowdHttpAuthenticatorclientProperties
- ClientPropertiespublic CrowdSecurityFilter(CrowdHttpAuthenticator httpAuthenticator, AuthenticationUrlProvider authenticationUrlProvider)
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
filterConfig
- the FilterConfig
to use.javax.servlet.ServletException
- Filter
related problems.public void destroy()
destroy
in interface javax.servlet.Filter
public void doFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain filterChain) throws IOException, javax.servlet.ServletException
doFilter
in interface javax.servlet.Filter
servletRequest
- the ServletRequest
to use.servletResponse
- the ServletResponse
to use.filterChain
- the FilterChain
to use.IOException
- I/O related problems.javax.servlet.ServletException
- Servlet
related problems.protected String authenticationUrl(javax.servlet.http.HttpServletRequest request)
request
- the HTTP request.HttpServletResponse.sendRedirect(String)
Copyright © 2017 Atlassian. All rights reserved.