package org.springblade.common.auth.support;

/**
 * @author caiyihua
 */
public enum AuthErrorConstants {

    NOT_LOGIN("CMN_1000", "用户未登录或已过期"), 
    
    NO_PERMISSION("CMN_1001", "没有相应的权限"),
    
    INVALID_ACCESS_TOKEN("CMN_1002", "AccessToken不匹配");

    private String code;
    private String message;

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

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return "[" + code + "] " + message;
    }
}