Chromium Code Reviews| Index: net/android/java/src/org/chromium/net/HttpNegotiateConstants.java |
| diff --git a/net/android/java/src/org/chromium/net/HttpNegotiateConstants.java b/net/android/java/src/org/chromium/net/HttpNegotiateConstants.java |
| index fa17647f4a0888144e68f83d8f7e39772b34bd40..fabb636ad55c942ef8e236a70eec88bb0d0b403c 100644 |
| --- a/net/android/java/src/org/chromium/net/HttpNegotiateConstants.java |
| +++ b/net/android/java/src/org/chromium/net/HttpNegotiateConstants.java |
| @@ -4,6 +4,11 @@ |
| package org.chromium.net; |
| +import android.support.annotation.IntDef; |
| + |
| +import java.lang.annotation.Retention; |
| +import java.lang.annotation.RetentionPolicy; |
| + |
| /** |
| * Constants used by Chrome in SPNEGO authentication requests to the Android Account Manager. |
| */ |
| @@ -27,25 +32,57 @@ |
| // Prefix of token type. Full token type is "SPNEGO:HOSTBASED:<spn>" |
| public static final String SPNEGO_TOKEN_TYPE_BASE = "SPNEGO:HOSTBASED:"; |
| + /** */ |
| + @IntDef({STATUS_CODE_OK, STATUS_CODE_REQUEST_ERROR, STATUS_CODE_AUTHENTICATOR_ERROR}) |
| + @Retention(RetentionPolicy.SOURCE) |
| + public @interface NegotiateStatus {} |
| + |
| + /** |
| + * All OK. The returned token is valid. |
| + */ |
| + public static final int STATUS_CODE_OK = 0; |
|
asanka
2015/11/25 15:08:08
For multi-round authentication schemes like Negoti
dgn
2015/11/25 16:16:56
Is this distinction made on the desktop? AFAIK on
asanka
2015/11/25 20:10:08
That depends on what the strategy is for handling
|
| + |
| + /** |
| + * Request failed. It can be tried again. |
| + * Return this to tell the browser to not retry until it is restarted. |
|
asanka
2015/11/25 15:08:08
Not sure what 'it' means here. Also the distinctio
dgn
2015/11/25 16:16:56
'it' was referring to the browser, I wrote that ba
asanka
2015/11/25 20:10:08
Ok. But what does "Return this to tell the browser
|
| + */ |
| + public static final int STATUS_CODE_REQUEST_ERROR = 10; |
| + |
| + /** |
| + * Request failed. The authenticator is in a bad state and cannot resolve requests. |
| + * Return this to tell the browser to not retry until it is restarted. |
| + */ |
| + public static final int STATUS_CODE_AUTHENTICATOR_ERROR = 11; |
| + |
| // Returned status codes |
| // All OK. Returned token is valid. |
| + @Deprecated |
| public static final int OK = 0; |
| // An unexpected error. This may be caused by a programming mistake or an invalid assumption. |
| + @Deprecated |
| public static final int ERR_UNEXPECTED = 1; |
| // Request aborted due to user action. |
| + @Deprecated |
| public static final int ERR_ABORTED = 2; |
| // An unexpected, but documented, SSPI or GSSAPI status code was returned. |
| + @Deprecated |
| public static final int ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS = 3; |
| // The server's response was invalid. |
| + @Deprecated |
| public static final int ERR_INVALID_RESPONSE = 4; |
| // Credentials could not be established during HTTP Authentication. |
| + @Deprecated |
| public static final int ERR_INVALID_AUTH_CREDENTIALS = 5; |
| // An HTTP Authentication scheme was tried which is not supported on this machine. |
| + @Deprecated |
| public static final int ERR_UNSUPPORTED_AUTH_SCHEME = 6; |
| // (GSSAPI) No Kerberos credentials were available during HTTP Authentication. |
| + @Deprecated |
| public static final int ERR_MISSING_AUTH_CREDENTIALS = 7; |
| // An undocumented SSPI or GSSAPI status code was returned. |
| + @Deprecated |
| public static final int ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS = 8; |
| // The identity used for authentication is invalid. |
| + @Deprecated |
| public static final int ERR_MALFORMED_IDENTITY = 9; |
| } |