mirror of
https://gitee.com/dromara/sa-token.git
synced 2026-02-27 16:50:24 +08:00
新增 OIDC 协议实现
This commit is contained in:
+3
-4
@@ -18,7 +18,6 @@ package cn.dev33.satoken.solon.oauth2;
|
||||
import cn.dev33.satoken.oauth2.SaOAuth2Manager;
|
||||
import cn.dev33.satoken.oauth2.config.SaOAuth2ServerConfig;
|
||||
import cn.dev33.satoken.oauth2.template.SaOAuth2Template;
|
||||
import cn.dev33.satoken.oauth2.template.SaOAuth2Util;
|
||||
import org.noear.solon.annotation.Bean;
|
||||
import org.noear.solon.annotation.Condition;
|
||||
import org.noear.solon.annotation.Configuration;
|
||||
@@ -36,11 +35,11 @@ public class SaOAuth2AutoConfigure {
|
||||
@Bean
|
||||
public void init(AppContext appContext) throws Throwable {
|
||||
appContext.subBeansOfType(SaOAuth2Template.class, bean -> {
|
||||
SaOAuth2Util.saOAuth2Template = bean;
|
||||
SaOAuth2Manager.setTemplate(bean);
|
||||
});
|
||||
|
||||
appContext.subBeansOfType(SaOAuth2ServerConfig.class, bean -> {
|
||||
SaOAuth2Manager.setConfig(bean);
|
||||
SaOAuth2Manager.setServerConfig(bean);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -48,7 +47,7 @@ public class SaOAuth2AutoConfigure {
|
||||
* 获取 OAuth2配置Bean
|
||||
*/
|
||||
@Bean
|
||||
public SaOAuth2ServerConfig getConfig(@Inject(value = "${sa-token.oauth2}", required = false) SaOAuth2ServerConfig oAuth2Config) {
|
||||
public SaOAuth2ServerConfig getConfig(@Inject(value = "${sa-token.oauth2-server}", required = false) SaOAuth2ServerConfig oAuth2Config) {
|
||||
return oAuth2Config;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user