package com.njzscloud.common.security.ex;

import cn.hutool.core.util.StrUtil;
import com.njzscloud.common.core.ex.ExceptionMsg;
import org.springframework.security.core.AuthenticationException;

/**
 * 认证异常
 */
public class UserLoginException extends AuthenticationException {

    public final ExceptionMsg msg;

    public UserLoginException(ExceptionMsg exceptionMsg, String message) {
        super(message);
        this.msg = exceptionMsg;
    }

    public UserLoginException(Throwable cause, ExceptionMsg exceptionMsg, String message, Object... param) {
        super(StrUtil.format(message, param), cause);
        this.msg = exceptionMsg;
    }

    public UserLoginException(Throwable cause, ExceptionMsg exceptionMsg, String message) {
        super(message, cause);
        this.msg = exceptionMsg;
    }

}
