【发布时间】:2023-01-10 00:02:03
【问题描述】:
这是一个角度/身份服务器/Web Api 实现。 由于某些奇怪的原因,身份服务器似乎没有收到验证客户端应用程序所需的配置信息。 就在应用程序启动时,它抱怨“必须在配置中提供权限 URL!配置验证因错误而被拒绝。未设置配置”
下面是我的 app.module 中的代码,应该在其中设置配置
export const httpLoaderFactory = (httpClient: HttpClient) => {
const config$ = httpClient.get<any>(`${window.location.origin}/api/ClientAppSettings`)
.pipe(
map((customConfig: any) => {
return {
stsServer: customConfig.stsServer,
redirectUrl: customConfig.redirect_url,
clientId: customConfig.client_id,
responseType: customConfig.response_type,
scope: customConfig.scope,
postLogoutRedirectUri: customConfig.post_logout_redirect_uri,
startCheckSession: customConfig.start_checksession,
silentRenew: customConfig.silent_renew,
silentRenewUrl: customConfig.redirect_url + '/silent-renew.html',
postLoginRoute: customConfig.startup_route,
forbiddenRoute: customConfig.forbidden_route,
unauthorizedRoute: customConfig.unauthorized_route,
logLevel: 0, // LogLevel.logLevel or customConfig.logLevel
maxIdTokenIatOffsetAllowedInSeconds: customConfig.max_id_token_iat_offset_allowed_in_seconds,
historyCleanupOff: true,
// autoUserInfo: false,
};
})
)
//.toPromise();
return new StsConfigHttpLoader(config$);
};
【问题讨论】:
标签: angular authentication asp.net-identity