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