Complex Claim Values in .NET Framework with System.Security.Claims

前端 未结 2 1651
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-08 12:47

I\'m developing a web app with Asp.Net 5 MVC, Owin and Oauth2 bearer token as auth type.

Following this guide that adds a custom complex claim Json serialized to an inst

2条回答
  •  北恋
    北恋 (楼主)
    2021-02-08 13:02

    This is not supported nor recommended - claims are key / value pairs - keep them as simple as possible.

    There are a number of supporting classes in .NET that can't handle what you are trying to achieve (the SAM, CookieMiddleware etc)..

    see also here http://leastprivilege.com/2012/10/08/custom-claims-principals-in-net-4-5/

提交回复
热议问题