package com.kingdee.eas.custom.integration.apimgt.constant;

public final class ApiConstants {

    private ApiConstants() {
    }

    /** 密钥请求头 */
    public static final String API_SECRET_HEADER = "X-Api-Secret";

    /** 请求属性 Key：当前平台授权单 */
    public static final String REQUEST_ATTR_APP = "OPEN_API_CURRENT_APP";

    /** 请求属性 Key：请求开始时间戳 */
    public static final String REQUEST_ATTR_START_TIME = "OPEN_API_START_TIME";

    /** 请求属性 Key：API 权限编码 */
    public static final String REQUEST_ATTR_API_CODE = "OPEN_API_CODE";

    /** 请求属性 Key：调用方身份标识 */
    public static final String REQUEST_ATTR_CALLER_KEY = "OPEN_API_CALLER_KEY";

    /** OpenAPI 路径前缀 */
    public static final String OPENAPI_PATH = "/openapi/";

    /** 响应码：成功 */
    public static final int CODE_SUCCESS = 0;

    /** 响应码：未授权 */
    public static final int CODE_UNAUTHORIZED = 401;

    /** 响应码：禁止访问 */
    public static final int CODE_FORBIDDEN = 403;

    /** 响应码：服务内部错误 */
    public static final int CODE_ERROR = 500;

    /** 状态：启用 */
    public static final String STATUS_ENABLED = "1";

    /** 状态：禁用 */
    public static final String STATUS_DISABLED = "0";
}
