我正在研究需要使用 AD FS 进行身份验证的角度 SPA。我使用 Spring Boot 作为后端。
this.oauthService.configure({
redirectUri: window.location.origin + '/app/search',
requireHttps: true,
scope: 'openid profile email',
responseType: 'id_token token',
oidc: true,
clientId: environment.adfsClientId,
loginUrl: environment.adfsUrl + '/oauth2/authorize',
issuer: environment.adfsUrl,
logoutUrl:
environment.adfsUrl +
'/ls/?wa=wsignoutcleanup1.0&wreply=' +
location.protocol +
'//' +
location.hostname +
(location.port ? ':' + location.port : ''),
postLogoutRedirectUri:
location.protocol +
'//' +
location.hostname +
(location.port ? ':' + location.port : ''),
});
上面给出的是配置。我将此作为参考。
但我收到以下错误。
加载发现文档时出错 O {headers: h, status: 0, statusText: "Unknown Error", url: "https://adfs_domain/adfs/.well-known/openid-configuration", ok: false, ...} 错误: ProgressEvent {isTrusted: true, lengthComputable: false, loaded: 0, total: 0, type: "error", ...} headers: h {normalizedNames: Map(0), lazyUpdate: null, headers: Map(0)} 消息: " https://adfs_domain/adfs/.well-known/openid-configuration 的 Http 失败响应:0 未知错误" 名称:"HttpErrorResponse" ok: false 状态:0 statusText:"未知错误" url:"https:// adfs_domain/adfs/.well-known/openid-configuration"
注意:我可以从我的浏览器访问相同的 URL,https://adfs_domain/adfs/.well-known/openid-configuration。配置中的颁发者 URL 和浏览器中的响应也是相同的。
谁能帮忙?