public class LoginFilter extends PasswordBasedLoginFilter
Since 3.1.0 this filter does not let you log in through values in the URL "query string" by default because your password will then end up in HTTP Request logs. Host Applications can override the default or even expose a flag to users to set the required behaviour if required for legacy situations.
The form post/get action should be the URL of the login servlet/JSP/action - given by SecurityFilter.LOGIN_URL.
If the parameters exist and authentication is successful, the user will be redirected by the filter to the URL given by the session attribute at SecurityFilter.ORIGINAL_URL_KEY.
If this URL doesn't exist, it will look for a parameter 'os_destination' to use as the redirected URL instead.
If neither is found, it is assumed that the page will check the authorisation status and handle redirection itself.
From the any other filter in the request, or the servlet/JSP/action which processes the request, you can look up the status of the authorisation attempt. The status is a String request attribute, with the key 'os_authstatus'.
The possible statuses are:
PasswordBasedLoginFilter.UserPasswordPairAUTHENTICATION_ERROR_TYPE, LOGIN_ERROR, LOGIN_FAILED, LOGIN_NOATTEMPT, LOGIN_SUCCESS, OS_AUTHSTATUS_KEY| Constructor and Description |
|---|
LoginFilter() |
| Modifier and Type | Method and Description |
|---|---|
protected PasswordBasedLoginFilter.UserPasswordPair |
extractUserPasswordPair(javax.servlet.http.HttpServletRequest request)
Returns a username password pair for this request.
|
void |
init(javax.servlet.FilterConfig config) |
void |
setAllowUrlParameterValue(boolean allowUrlParameterValue)
Sets the value of allowUrlParameterValue.
|
void |
setDisableLoggingDeprecationUrlParameterValue(boolean disableLoggingDeprecationUrlParameterValue)
Sets the value of disableLoggingDeprecationUrlParameterValue.
|
logindestroy, doFilter, getAuthenticationContext, getAuthenticator, getElevatedSecurityGuard, getSecurityConfig, isAbsoluteUrl, redirectToOriginalDestinationpublic void init(javax.servlet.FilterConfig config)
init in interface javax.servlet.Filterinit in class BaseLoginFilterpublic void setAllowUrlParameterValue(boolean allowUrlParameterValue)
allowUrlParameterValue - if true then url parameter values for username
and password will be accepted.
If false url parameter values for username and
password will not be accepted.public void setDisableLoggingDeprecationUrlParameterValue(boolean disableLoggingDeprecationUrlParameterValue)
disableLoggingDeprecationUrlParameterValue - if true then deprecated url parameter
usage will not be logged.
If false then deprecated url parameter
usage will be logged.protected PasswordBasedLoginFilter.UserPasswordPair extractUserPasswordPair(javax.servlet.http.HttpServletRequest request)
PasswordBasedLoginFilterextractUserPasswordPair in class PasswordBasedLoginFilterrequest - the HTTP request in playCopyright © 2018 Atlassian. All rights reserved.