MVC客户端获取IdentityServer4认证中的Claims信息没有role内容
IdentityServer4项目(IdentityServer4 with ASP.NET Core Idetity)
MVC项目(core 3.1)
使用OpenIdConnect实现IdentityServer4对MVC的登录认证。
问题起因:IdentityServer4项目中能够获取得到ClaimType="role"的value值,但是mvc项目中获取不到
IdentityServer4项目获取Claims视图

MVC项目获取Claims视图

原因:未对IdentityServer4项目中的Config文件进行有关获取ClaimType="role"的配置

mvc项目也要对应配置

本文来自博客园,作者:weichangk,转载请注明原文链接:https://www.cnblogs.com/weichangk/p/15596906.html

浙公网安备 33010602011771号