package ink.wgink.login.oauth2.server.exceptions;

import org.springframework.security.oauth2.common.exceptions.ClientAuthenticationException;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: ClientBadClientCredentialsException
 * @Description: 认证失败异常
 * @Author: WangGeng
 * @Date: 2020/7/23 11:11 下午
 * @Version: 1.0
 **/
public class OAuth2ClientBadClientCredentialsException extends ClientAuthenticationException {

    public OAuth2ClientBadClientCredentialsException(String msg) {
        super(msg);
    }

    @Override
    public int getHttpErrorCode() {
        return 401;
    }

    @Override
    public String getOAuth2ErrorCode() {
        return "invalid_client";
    }

}
