question related to this post here: Configure the authorization server endpoint.
Using the above example I am able to get token. previously it was possible to get additional information by over riding
public override Task TokenEndpoint(OAuthTokenEndpointContext context)
{
foreach (KeyValuePair<string, string> property in context.Properties.Dictionary)
{
context.AdditionalResponseParameters.Add(property.Key, property.Value);
}
return Task.FromResult<object>(null);
}
how do you achieve that in the current implementation of
public override Task TokenEndpoint(TokenEndpointContext context){
}
Thanks!
Your best option is to directly use the
ApplyTokenResponse
event to update the JSON payload returned to the client application. UnlikeAdditionalResponseParameters
, it allows you to add - or remove - virtually anything: objects, arrays, strings, integers...Here's how you can do that: