I want to eject a logic that if access token is expired then generate refresh token on onAuthorization(AuthorizationFilterContext context) method in ASP.NET WEB API Core.
But i am not able to find a way to get token details.Basically how to get token details like expiry , refresh token from AuthorizationFilterContext.
public void OnAuthorization(AuthorizationFilterContext context)
{
var user = context.HttpContext.User;
if (!user.Identity.IsAuthenticated)
{
var test = context.;
..code to get refresh token...
}
}