1 // Copyright 2015 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 package org.chromium.net; 6 7 /** 8 * Constants used by Chrome in SPNEGO authentication requests to the Android Account Manager. 9 */ 10 public class HttpNegotiateConstants { 11 // Option bundle keys 12 // 13 // The token provided by in the HTTP 401 response (Base64 encoded string) 14 public static final String KEY_INCOMING_AUTH_TOKEN = "incomingAuthToken"; 15 // The SPNEGO Context from the previous transaction (Bundle) - also used in the response bundle 16 public static final String KEY_SPNEGO_CONTEXT = "spnegoContext"; 17 // True if delegation is allowed 18 public static final String KEY_CAN_DELEGATE = "canDelegate"; 19 20 // Response bundle keys 21 // 22 // The returned status from the authenticator. 23 public static final String KEY_SPNEGO_RESULT = "spnegoResult"; 24 25 // Name of SPNEGO feature 26 public static final String SPNEGO_FEATURE = "SPNEGO"; 27 // Prefix of token type. Full token type is "SPNEGO:HOSTBASED:<spn>" 28 public static final String SPNEGO_TOKEN_TYPE_BASE = "SPNEGO:HOSTBASED:"; 29 30 // Returned status codes 31 // All OK. Returned token is valid. 32 public static final int OK = 0; 33 // An unexpected error. This may be caused by a programming mistake or an invalid assumption. 34 public static final int ERR_UNEXPECTED = 1; 35 // Request aborted due to user action. 36 public static final int ERR_ABORTED = 2; 37 // An unexpected, but documented, SSPI or GSSAPI status code was returned. 38 public static final int ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS = 3; 39 // The server's response was invalid. 40 public static final int ERR_INVALID_RESPONSE = 4; 41 // Credentials could not be established during HTTP Authentication. 42 public static final int ERR_INVALID_AUTH_CREDENTIALS = 5; 43 // An HTTP Authentication scheme was tried which is not supported on this machine. 44 public static final int ERR_UNSUPPORTED_AUTH_SCHEME = 6; 45 // (GSSAPI) No Kerberos credentials were available during HTTP Authentication. 46 public static final int ERR_MISSING_AUTH_CREDENTIALS = 7; 47 // An undocumented SSPI or GSSAPI status code was returned. 48 public static final int ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS = 8; 49 // The identity used for authentication is invalid. 50 public static final int ERR_MALFORMED_IDENTITY = 9; 51 } 52