identityserver4 - 使用 Oidc-Client 自定义声明 IdentityServer4 和 Angular5
问题描述
我将 identityserver4 与 aspnetIdentity 一起用于用户管理
从 AccountController(示例代码) - 调用登录方法并返回令牌但令牌不包含任何声明,我也实现了 IprofileService 但端点从未被命中。在数据库中 - 我为该 IdentityResource 添加了 IdentityResource,Identityclaims 并使用 alwaysincludeClaimsinToken 标记客户端
在 IdentityServer IProfile 服务中添加了一些示例中给出的但是所有这些都没有调用 Profileservice 并且除了标准 id_token 信息之外没有任何信息添加到令牌中 请让我知道我错过了什么
解决方案
我发现 Iprofileservie 实现不适用于 localhost 配置,而在实际服务器上部署时同样有效。我向 ASNEtUSers 添加了属性。添加了 IdentityResource 和 IdentityResourceClaim 数据,如果客户端动态询问,则在 Profileservice 中添加声明。
推荐阅读
- html - 如何在 Pandas 中使用 read_html 访问 HTML 的类之一?
- php - PHP/CSS - 在每个 td 上添加值 > 0 的 css
- node.js - 是否可以使用 api node.js 在 Wave 区块链网络中生成钱包?
- node.js - 如何在返回和下一个函数回调后停止承诺进一步执行?
- angular - 识别组件发射输出属性
- android - Android Studio 3.4.1,Kotlin“未解决的参考:mutableListOf”
- css - Angular Material mat-icon-button,在 Ionic 中垂直对齐文本
- html - 如何在标题 div 下移动我的视差背景图像
- c# - 提取安全组成员时服务器上没有此类对象
- angular - Angular 使用中的 Merge Map 运算符