cn.dev33.satoken.oauth2.SaOAuth2Manager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sa-token-oauth2 Show documentation
Show all versions of sa-token-oauth2 Show documentation
sa-token realization oauth2.0
package cn.dev33.satoken.oauth2;
import cn.dev33.satoken.oauth2.config.SaOAuth2Config;
/**
* Sa-Token-OAuth2 模块 总控类
*
* @author kong
*
*/
public class SaOAuth2Manager {
/**
* OAuth2 配置 Bean
*/
private static SaOAuth2Config config;
public static SaOAuth2Config getConfig() {
if (config == null) {
// 初始化默认值
synchronized (SaOAuth2Manager.class) {
if (config == null) {
setConfig(new SaOAuth2Config());
}
}
}
return config;
}
public static void setConfig(SaOAuth2Config config) {
SaOAuth2Manager.config = config;
}
}