0
antonis created
3 Answer(s)
-
0
- What is your product version?
- What is your product type (Angular or MVC)?
- What is product framework type (.net framework or .net core)?
Are you using JWT or Identity server?
-
0
6.5 angular .net core. I m using default authentication. I suppose is JWT isn't it?
-
0
You can get the jwt token from the HttpContext via
IHttpContextAccessor
and parse it.var jwt = "(the JTW here)"; var handler = new JwtSecurityTokenHandler(); var token = handler.ReadJwtToken(jwt); // now do something with token.Claims, token.Audiences, etc.
https://stackoverflow.com/questions/38340078/how-to-decode-jwt-token https://developer.okta.com/blog/2019/06/26/decode-jwt-in-csharp-for-authorization