Skip to content
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

Decoding Token returns json instead of claims principal #302

Closed
duhowise opened this issue Dec 7, 2020 · 1 comment
Closed

Decoding Token returns json instead of claims principal #302

duhowise opened this issue Dec 7, 2020 · 1 comment
Assignees
Labels

Comments

@duhowise
Copy link

duhowise commented Dec 7, 2020

var json = new JwtBuilder()
                .WithAlgorithm(new HMACSHA256Algorithm()) // symmetric
                .WithSecret(ConfigurationManager.AppSettings["SigningKey"])
                .MustVerifySignature()
                .Decode(token);
@abatishchev abatishchev self-assigned this Dec 8, 2020
@abatishchev
Copy link
Member

Use DecodeToObject<Dictionary<string,string>>(token) to decode the payload into a dictionary.

See also JwtAuthenticationHandler and DefaultIdentityFactory for creating claims principal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants