I have the following:
OAuthAuthorizationServerOptions OAuthServerOptions = new OAuthAuthorizationServerOptions() { AllowInsecureHttp = true, TokenEndpointPath = new PathString("/token"), AccessTokenExpireTimeSpan = TimeSpan.FromDays(1), Provider = new SimpleAuthorizationServerProvider(), };
Everything works fine, I need to call / token with request body arguments using Content-Type: application/x-www-form-urlencoded
My problem is that I have a requirement to allow the creation of tokens from a client that cannot send data as Content-Type: application/x-www-form-urlencoded , it can send arguments only as Json, which according to OAuth 2 is not suitable , and in addition, Microsoft Owin does not allow this.
How can I manually create tokens for this purpose? I suppose I should create a webapi method for this, but how can I use a regular Microsoft Owin provider?
thanks a lot
source share