

package com.nantian.sc.cloud.common.security.exception;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.nantian.sc.cloud.common.security.component.ScAuth2ExceptionSerializer;
import lombok.Getter;
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;

/**
 *
 * @date 2018/7/8
 * 自定义OAuth2Exception
 */
@JsonSerialize(using = ScAuth2ExceptionSerializer.class)
public class ScAuth2Exception extends OAuth2Exception {
	@Getter
	private String errorCode;

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

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