/**
 * Autogenerated by Thrift Compiler (0.9.2)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package com.xiaomi.infra.galaxy.rpc.thrift;

import libthrift091.scheme.IScheme;
import libthrift091.scheme.SchemeFactory;
import libthrift091.scheme.StandardScheme;

import libthrift091.scheme.TupleScheme;
import libthrift091.protocol.TTupleProtocol;
import libthrift091.protocol.TProtocolException;
import libthrift091.EncodingUtils;
import libthrift091.TException;
import libthrift091.async.AsyncMethodCallback;
import libthrift091.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
public class AuthenticationConstants {

  /**
   * 登录方式是否支持签名
   */
  public static final Map<UserType,Boolean> SIGNATURE_SUPPORT = new HashMap<UserType,Boolean>();
  static {
    SIGNATURE_SUPPORT.put(com.xiaomi.infra.galaxy.rpc.thrift.UserType.DEV_XIAOMI_SSO, false);
    SIGNATURE_SUPPORT.put(com.xiaomi.infra.galaxy.rpc.thrift.UserType.DEV_XIAOMI, true);
    SIGNATURE_SUPPORT.put(com.xiaomi.infra.galaxy.rpc.thrift.UserType.APP_SECRET, true);
    SIGNATURE_SUPPORT.put(com.xiaomi.infra.galaxy.rpc.thrift.UserType.APP_ACCESS_TOKEN, true);
    SIGNATURE_SUPPORT.put(com.xiaomi.infra.galaxy.rpc.thrift.UserType.APP_XIAOMI_SSO, false);
    SIGNATURE_SUPPORT.put(com.xiaomi.infra.galaxy.rpc.thrift.UserType.APP_ANONYMOUS, false);
  }

  /**
   * 签名相关的HTTP头，
   * 根据分层防御的设计，使用HTTPS也建议进行签名:
   * http://bitcoin.stackexchange.com/questions/21732/why-api-of-bitcoin-exchanges-use-hmac-over-https-ssl
   */
  public static final String HK_HOST = "Host";

  /**
   * 签名时间，1970/0/0开始的秒数，如客户端与服务器时钟相差较大，会返回CLOCK_TOO_SKEWED错误
   */
  public static final String HK_TIMESTAMP = "X-Xiaomi-Timestamp";

  public static final String HK_CONTENT_MD5 = "X-Xiaomi-Content-MD5";

  /**
   * 内容为TJSONTransport.encode(HttpAuthorizationHeader)
   */
  public static final String HK_AUTHORIZATION = "Authorization";

  /**
   * 认证 service_admin, 用于 SDS/FDS 等可信认的 Server 作为 producer 向 Talos 推送数据
   * 构造Credential的AccessKeyId的格式为："HK_SERVICE_ADMIN#AccessKeyId#AttachedInfo"
   * 其中，AttachedInfo可以是developerId或其他信息
   */
  public static final String HK_SERVICE_ADMIN = "Service-Admin";

  public static final String HK_SERVICE_MARK = "#";

  /**
   * 建议签名应包含的HTTP头
   */
  public static final List<String> SUGGESTED_SIGNATURE_HEADERS = new ArrayList<String>();
  static {
    SUGGESTED_SIGNATURE_HEADERS.add("Host");
    SUGGESTED_SIGNATURE_HEADERS.add("X-Xiaomi-Timestamp");
    SUGGESTED_SIGNATURE_HEADERS.add("X-Xiaomi-Content-MD5");
  }

}

@@ -2676,24 +2676,90 @@
 ARK = %22#%22;%0A%0A
+  public static final String HK_ATTACHED_INFO = %22Attached-Info%22;%0A%0A
   /**%0A   * %E5%BB%BA

update generated file