Reputation: 332
The token is always returned following information:
{
"access_token": ".....",
"token_type": "bearer",
"expires_in": 1199,
"custom_info1": ".....",
"custom_info2": "....",
".expires": "Fri, 13 Nov 2015 20:24:06 GMT",
".issued": "Fri, 13 Nov 2015 20:04:06 GMT"
}
Can we remove the .expires and .issued information?
Upvotes: 1
Views: 235
Reputation: 26
Hi You can remove them by override the TokenEndpointResponse method
public override Task TokenEndpointResponse(OAuthTokenEndpointResponseContext context)
{
foreach (KeyValuePair<string, string> property in context.Properties.Dictionary)
{
if (property.Key != ".issued" && property.Key != ".expires")
{
context.AdditionalResponseParameters.Add(property.Key, property.Value);
}
}
return Task.FromResult<object>(null);
}
Upvotes: 1