The authentication server is a .net framework app which generates a token using the machineKey here is the snipet
public async Task GrantResourceOwnerCredentials(OAuthGrantResourceOwnerCredentialsContext context)
{
var userAuthResult = Authentication.AuthenticateUser(context.UserName, context.Password, ref userId);
if (userAuthResult != AuthenticateUserResult.Success)
{
context.SetError("invalid_grant", "Unable to Authorize");
return;
}
var claims = new List<Claim>
{
new Claim(ClaimTypes.Name, UserName),
new Claim("DisplayName", FirstName),
};
var oAuthIdentity = new ClaimsIdentity(claims, context.Options.AuthenticationType);
AuthenticationProperties properties = CreateProperties(context.ClientId);
var ticket = new AuthenticationTicket(oAuthIdentity, properties);
context.Validated(ticket);
}
There is another .net core application (API) which I working on right now. The user passes the access_token which gets from authentication server via authorization header. What I am trying to do is look for a way to decrypt the token to see the claims. I was wondering if there is a library which I can pass in the token and machineKey to decrypt it or any other way?