Documentation
Documentation copied to clipboard
Custom Claims in Access Token
Hi,
1-) I am trying to add few claims to access token, While debugging I observerd, it has been added to AuthenticationResult- Claims, But I do not see in JWT Access Token. Please find the image below for reference. I have added one claim named "mem" value 123.
I have added this as below in AuthenticationLocalAsync method.
IEnumerable<Claim> claim = new Claim[] { new Claim("mem", "123") };
context.AuthenticateResult =
new AuthenticateResult(context.UserName, context.UserName, claim);
2-) 2nd issue is - GetProfileDataAsync method is not getting executed when I am using PostMan as client, As the API server is being developed for Mobile client, So I am using PostMan client. In login itself I want to get the claim which I have mentioned in the 1st point. Please help, I already spent a lot of time to figure out these two points.
Thanks