-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add custom claims with object value #498
Comments
Hi, there is not way to serialize a custom object for the moment. You can this achieve by using a
This is "by design" for avoiding two issues: |
For convenience it should be interessant to allow
for hiding the |
Fixed in version 2.0.0-beta.1 Jwt/samples/JwsCreationSample/Program.cs Lines 62 to 84 in 1c98645
If required, the JSON serialization behavior can be controled with the |
i couldn't find a way to add custom claims to JwsDescriptor which accepts claim value as object, where it get automatically json serialized when jwt is written.
e.g.
descriptor.AddClaim("https://hasura.io/jwt/claims", new HasuraClaim
{
UserId = user.Id,
DefaultRole = "user",
Roles = new[] { "user" }
});
The text was updated successfully, but these errors were encountered: