com.apamax.authentication
Event AuthResult
The results of an auth check against a CachedAuthentication object.
-
See Also:
-
com.apamax.authentication.CachedAuthentication#checkHeader() - This functions returns AuthResult objects.
| Constant summary |
constant integer | AUTH_FAILED := 0
A result of a failed authentication. |
constant integer | AUTH_REQUIRED := 1
A result that authorization was not given, but is required. |
constant integer | AUTH_SUCCEEDED := 4
A result that authentication has succeeded. Also provides the token, but the expectation is that the client already has it. |
constant integer | NEW_TOKEN := 3
A result that authentication has succeeded, but a potentially new token has been generated and should be stored and used. |
constant integer | TOKEN_EXPIRED := 2
A result with an authorization token which has expired, password authentication should now be attempted. |
| Member summary |
integer | result
The result of this auth check. Should be one of AUTH_FAILED, AUTH_REQUIRED, TOKEN_EXPIRED, NEW_TOKEN or AUTH_SUCCEEDED. AUTH_SUCCEEDED and NEW_TOKEN are success results. AUTH_REQUIRED and TOKEN_EXPIRED are temporary failure results. AUTH_FAILED is a permanent failure result. |
string | user
The username that was authenticated (if successful). |
string | tokenHeader
A currently valid token for this user (if successful). |
| Action summary |
boolean | success()
Returns true if this result contains a success outcome. |
AUTH_FAILED
constant integer AUTH_FAILED := 0
A result of a failed authentication.
AUTH_REQUIRED
constant integer AUTH_REQUIRED := 1
A result that authorization was not given, but is required.
AUTH_SUCCEEDED
constant integer AUTH_SUCCEEDED := 4
A result that authentication has succeeded. Also provides the token, but the expectation is that the client already has it.
NEW_TOKEN
constant integer NEW_TOKEN := 3
A result that authentication has succeeded, but a potentially new token has been generated and should be stored and used.
TOKEN_EXPIRED
constant integer TOKEN_EXPIRED := 2
A result with an authorization token which has expired, password authentication should now be attempted.
result
integer result
The result of this auth check. Should be one of AUTH_FAILED, AUTH_REQUIRED, TOKEN_EXPIRED, NEW_TOKEN or AUTH_SUCCEEDED. AUTH_SUCCEEDED and NEW_TOKEN are success results. AUTH_REQUIRED and TOKEN_EXPIRED are temporary failure results. AUTH_FAILED is a permanent failure result.
tokenHeader
string tokenHeader
A currently valid token for this user (if successful).
user
string user
The username that was authenticated (if successful).
success
boolean success()
Returns true if this result contains a success outcome.