James Patterson
James Patterson
Is there a target date for this?
I heard this might be available by Ignite 2020. Did the target get met?
The version in the test branch seems to work for me where I hide the checkbox and style the label and use the FOR property to associate them. Just tested...
Great work. Looking forward to seeing this happen. Thanks!
I think it is working if I update to a prerelease nuget. So you might be able to close this.
Whilst it doesn't raise an exception decoding, there is some other issue perhaps with the mapping of claims. ``` options.AddPolicy("myPolicy", builder => builder //.RequireClaim("Email", "[email protected]") .RequireClaim("Role", "Manager") //.RequireRole("Manager") //.RequireClaim(ClaimTypes.Role, "Manager")...
The screenshot is showing that rather than a List, it is a string with the contents of the type. Shouldn't it be a real List? All the samples I've seen...
https://www.jerriepelser.com/blog/using-roles-with-the-jwt-middleware/ https://weblog.west-wind.com/posts/2021/Mar/09/Role-based-JWT-Tokens-in-ASPNET-Core https://andrewhalil.com/2020/09/14/role-retrieval-from-jwt-token-claims-in-net-core-applications/
I've also tried adding the role using the name "http://schemas.microsoft.com/ws/2008/06/identity/claims/role" too, e.g.: ``` eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJleHAiOjE2NTc1NDA4NzIsImNsYWltMSI6MCwiY2xhaW0yIjoiY2xhaW0yLXZhbHVlIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjpbIk1hbmFnZXIiLCJNYW5hZ2VyMiJdfQ.31Xg-92E3uNYlcbp0weIaBWCCQt7_r4L__mRto4luKzrgcuho0nx9bV9RMRD7jvWx4JRaAX2-EO8MHz-Mp9y2w ``` ``` { "typ": "JWT", "alg": "HS512" }.{ "exp": 1657540872, "claim1": 0, "claim2": "claim2-value", "http://schemas.microsoft.com/ws/2008/06/identity/claims/role": [...
Yeah, I think the problem is the extension. Having just debugged the extension I find this is the line that maps the array to a string. https://github.com/jwt-dotnet/jwt/blob/0704bca0fa6cbb8951914e04c8824f13dc104039/src/JWT.Extensions.AspNetCore/Factories/DefaultIdentityFactory.cs#L38 There is so...