I need to run some logic in an ASP.NET API action using the claims in the passed in access token. How do I get the access token? And later how do I get the claim value in the access token?
[HttpGet]
[Authorize(Policy = "PaidMember")]
[Route("GetVideos")]
public async Task<IEnumerable<VideoModel>> GetVideos(string topicId)
{
var accessToken = ... // TODO: Get the access token here
// Then something like the following
var type = accessToken.GetValue("membershiptype") // This line is made up
return await _service.GetVideos(topicId, type );
}