angular - 绕过 oidc-client 中的颁发者检查
问题描述
我们使用 Angular 7 作为前端,使用 .NET Core 3.1 作为后端。对于身份验证,我们在 Angular 上使用 IdentityServer 4 和 oidc-client。
我们需要绕过对 oidc-client 的发行人检查。UserManagerSettings 中有一个名为 userInfoJwtIssuer 的字符串属性,它有 3 种可能性:'ANY'、'OP' 或其他。通过阅读源代码,似乎通过设置'ANY',它应该绕过发行者检查,但没有发生,我们仍然收到来自令牌的发行者与发行者设置不匹配的错误。这是一个oidc客户端的配置
getClientSettings(settings: any): UserManagerSettings {
return {
authority: 'https://localhost:8411/backend/api/v1/am-admin/UmmProxy',
userInfoJwtIssuer: 'ANY',
client_id: 'someClientId',
redirect_uri : 'https://localhost:8411/callback',
post_logout_redirect_uri : 'https://localhost:8411',
response_type : 'code',
client_secret : 'someClientSecret',
scope : 'openid',
metadata: {
issuer: 'https://localhost:8411/backend/api/v1/am-admin/UmmProxy',
authorization_endpoint: `https://localhost:8411/backend/api/v1/am-admin/UmmProxy/connect/authorize?`,
token_endpoint: `https://localhost:8411/backend/api/v1/am-admin/UmmProxy/connect/token`,
end_session_endpoint: `https://localhost:8411/backend/api/v1/am-admin/UmmProxy/connect/checksession`,
userinfo_endpoint: `https://localhost:8411/backend/api/v1/am-admin/UmmProxy/connect/userinfo`,
}
};
您对如何让 oidc-client 绕过发行人检查有任何想法吗?
解决方案
推荐阅读
- reactjs - UseState 随机返回数据
- xamarin.ios - Xamarin IOS 需要重定向到 BB Access 以进行 OpenID 连接
- javascript - Java 脚本适用于数字但错误 80020101 与变量...为什么?
- powershell - Powershell 中的实时 TCP 接收器
- c++ - C++。类中指针数组的赋值运算符
- php - 使用 php(共享服务器)实现 Oauth 1.0a
- azure-devops - 分支策略“在最后一次迭代中至少需要一个批准”的含义不清楚
- python - AnalysisException:Sparksql - SUM with CASE WHEN
- android - 在 googleMap Activity 中显示 Toast
- python - 有没有办法使用 sklearn TF-IDF 模型来解决单词类比问题?