public static enum ValidationResult.Decision extends Enum<ValidationResult.Decision>
Usage Note
The names used for the Decision values and their documentation reflect the standard use of the
terms "authentication" and "authorization" in the security industry. Specifically, "authentication" is
about identification (proving who you are) and "authorization" is about
permission (associating who you are with what you are allowed to do).
In the early days of HTTP, "authentication" and "authorization" were largely synonymous because the access
controls were so simple that no distinction existed between these two concepts. An HTML page was
restricted with a username and password, and if you were able to successfully authenticate, then that
implicitly meant that you were authorized to access its content. Through this unfortunate accident of
history, the HTTP protocol calls the 401 status "Unauthorized". Semantically, however, a
"401 Unauthorized" status really means that the client is not authenticated,
and a "403 Forbidden" status means that the client is authenticated but not
authorized.
| Enum Constant and Description |
|---|
ABSTAIN
ASAP authentication was not used for this request.
|
AUTHORIZED
ASAP authentication was successful, and the token satisfied all of the validator's authorization
requirements.
|
NOT_AUTHENTICATED
ASAP authentication was attempted, but the
Authorization header was missing, could not
be parsed as containing a valid token, or is otherwise unacceptable. |
NOT_AUTHORIZED
ASAP authentication was attempted by the client, but at least one of the validation constraints could
not be satisfied (for example, if the token is not from an issuer that is authorized to use this resource).
|
NOT_VERIFIED
ASAP authentication is required, but no matching public key could be located to verify it.
|
REJECTED
ASAP authentication is explicitly disallowed, but an authentication header specifying an ASAP token was
found.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isOk()
If
true, then the validation was successful (either an appropriate token was found or none was
needed). |
static ValidationResult.Decision |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ValidationResult.Decision[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ValidationResult.Decision NOT_AUTHENTICATED
Authorization header was missing, could not
be parsed as containing a valid token, or is otherwise unacceptable.
Example reasons for this result include:
REQUIRE, but the Authorization header is
missing or does not contain a valid JWT.
Expected HTTP Status: 401 Unauthorized (See the Usage Note)
public static final ValidationResult.Decision NOT_VERIFIED
This could be either a temporary problem accessing the key service or a permanent failure if the key does not exist. Either way, since the authenticity of the token could not be verified, its contents cannot be trusted.
Expected HTTP Status: 401 Unauthorized (See the Usage Note)
public static final ValidationResult.Decision NOT_AUTHORIZED
Expected HTTP Status: 403 Forbidden
public static final ValidationResult.Decision AUTHORIZED
public static final ValidationResult.Decision REJECTED
Note that since the REJECT policy refuses all ASAP tokens regardless of their
contents, tokens are not passed through their normal validity checks. Any token received is assumed
to pass authentication and rejected as unauthorized, instead.
Expected HTTP Status: 403 Forbidden
public static final ValidationResult.Decision ABSTAIN
One of the following conditions applies:
public static ValidationResult.Decision[] values()
for (ValidationResult.Decision c : ValidationResult.Decision.values()) System.out.println(c);
public static ValidationResult.Decision 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 boolean isOk()
true, then the validation was successful (either an appropriate token was found or none was
needed).true if this decision allows a request to proceedCopyright © 2017 Atlassian. All rights reserved.