package com.kingdee.eas.custom.integration.apimgt.auth.model;

/**
 * 认证错误码
 */
public enum AuthErrorCode {

    SECRET_MISSING(40101, "认证密钥缺失"),
    SECRET_INVALID(40102, "认证密钥无效"),
    SECRET_EXPIRED(40103, "认证密钥已过期"),
    PLATFORM_DISABLED(40104, "平台未授权或已禁用"),
    PERMISSION_DENIED(40301, "无接口调用权限"),
    IP_BLACKLISTED(40302, "IP 已被列入黑名单"),
    AUTH_HEADER_INVALID(40106, "请求头格式错误"),
    API_NOT_FOUND(40401, "接口未在系统中注册");

    private final int code;
    private final String message;

    AuthErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
