I'm working on an old (.net 4.7) Web api project. I don't care about authenticating the user as this is done upstream but i need to read the Authorization header to get some user details from a JWT. I haven't added any auth code etc so i was hoping i could just get the JWT from the Authorization header.
Basic code
var requestHeaders = Request.Headers;
requestHeaders.TryGetValues("Authorization", out IEnumerable<string> jwtToken);
Why is jwtToken null ?