public enum LoginReason extends Enum<LoginReason>
| Enum Constant and Description |
|---|
AUTHENTICATED_FAILED
The user could not be authenticated.
|
AUTHENTICATION_DENIED
The user is not allowed to even attempt a login.
|
AUTHORISATION_FAILED
The user could not be authorised.
|
OK
The login was OK
|
OUT
This indicates that person has in fact logged "out"
|
| Modifier and Type | Field and Description |
|---|---|
static String |
REQUEST_ATTR_NAME
The name of the request attribute set by Seraph to indicate how the login process went
|
static String |
X_SERAPH_LOGIN_REASON
The name of the Header set by Seraph to indicate how the login process went
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isStamped(javax.servlet.http.HttpServletRequest httpServletRequest)
Checks if the given request has been stamped with this login reason.
|
LoginReason |
stampRequestResponse(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
This will stamp an attribute to the request called "com.atlassian.seraph.auth.LoginReason" to the toString() of
the enum and will also add an "X-Seraph-LoginReason" to this value
|
static LoginReason |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LoginReason[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LoginReason AUTHENTICATION_DENIED
ElevatedSecurityGuardpublic static final LoginReason AUTHENTICATED_FAILED
public static final LoginReason AUTHORISATION_FAILED
public static final LoginReason OUT
public static final LoginReason OK
public static final String X_SERAPH_LOGIN_REASON
public static final String REQUEST_ATTR_NAME
public static LoginReason[] values()
for (LoginReason c : LoginReason.values()) System.out.println(c);
public static LoginReason valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic LoginReason stampRequestResponse(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
Once a request/response is stamped, it wont be stamped again
httpServletRequest - the requesthttpServletResponse - the responsepublic boolean isStamped(javax.servlet.http.HttpServletRequest httpServletRequest)
httpServletRequest - the requeststampRequestResponse(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)Copyright © 2018 Atlassian. All rights reserved.