I am writing an API end point in ASP.NET using Owin, it is working fine and now I wan to make some changes.
First thing I wan tot do is to add a new grant type , for example I wan to use grant_type=xyz and currently it is Password.
Second thing is that I wan to add extra parameters to the response body, for example currently it has "access_token", "token_type" and "expires_in" and I want to add "organization_name" and "Developer.email"
I am trying to add a middle ware but don't know how to add parameters in response.
I have also tried this code in GrantResourceOwnerCredentials method but output is wrong JSON.
var jsonString = "{\"foo\":1,\"bar\":false}";
byte[] data = Encoding.UTF8.GetBytes(jsonString);
context.Response.ContentType = "application/json";
context.Response.Body.WriteAsync(data, 0, data.Length);

