package com.tofly.common.oauth.exception;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.tofly.common.oauth.compent.ToflyAuth2ExceptionSerializer;
import lombok.Getter;
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;

/**
 * @author Administrator
 * @date 2019/9/12  13:53
 */
@JsonSerialize(using = ToflyAuth2ExceptionSerializer.class)
public class ToflyAuth2Exception extends OAuth2Exception {
    @Getter
    private String errorCode;

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

    public ToflyAuth2Exception(String msg, String errorCode) {
        super(msg);
        this.errorCode = errorCode;
    }
}
