Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jwtBearerOptions.Events = new JwtBearerEvents
- {
- OnTokenValidated = context =>
- {
- if (context.SecurityToken is JwtSecurityToken accessToken)
- {
- if (context.Principal.Identity is ClaimsIdentity identity)
- {
- identity.AddClaim(new Claim("access_token", accessToken.RawData));
- }
- }
- return Task.CompletedTask;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement