mirror of
https://gitee.com/dromara/sa-token.git
synced 2024-11-29 18:37:49 +08:00
fix: 修复全局配置项 sa-token.oauth2-server.oidc.iss
无效的问题 fixes #12
This commit is contained in:
parent
982b0dde21
commit
bb37c972ff
@ -88,6 +88,14 @@ public class OidcScopeHandler implements SaOAuth2ScopeHandlerInterface {
|
||||
* @return /
|
||||
*/
|
||||
public String getIss() {
|
||||
// 如果开发者配置了 iss,则使用开发者配置的 iss
|
||||
String cfgIss = SaOAuth2Manager.getServerConfig().getOidc().getIss();
|
||||
if(SaFoxUtil.isNotEmpty(cfgIss)) {
|
||||
return cfgIss;
|
||||
}
|
||||
// 否则根据请求的 url 计算 iss
|
||||
// 例如请求 url 为: http://localhost:8081/abc/xyz?name=张三
|
||||
// 则计算的 iss 为: http://localhost:8081
|
||||
String urlString = SaHolder.getRequest().getUrl();
|
||||
try {
|
||||
URL url = new URL(urlString);
|
||||
|
Loading…
Reference in New Issue
Block a user