Token method in ASP.NET, Accepting every HTTP method in curl

I'm trying to burst, These requests storm my brain. I am using OS - Windows , command line interface - Powershell .

curl.exe -X GET -v local.qaapi.com/Token -d "username=XXXXX&password=XXXXX&clientid=XXXXX&grant_type=XXXXXX" curl.exe -X POST -v local.qaapi.com/Token -d "username=XXXXX&password=XXXXX&clientid=XXXXX&grant_type=XXXXXX" 

Both of them produce the same output, but in the case of POST-MAN (the user interface interface for requesting API calls), only POST and GET work . I tried to get GET-METHOD , knowing that this is not the correct syntax, the expected bad option, but it succeeded. The CorsMiddleware Class I used to configure for my API.

+2
source share
1 answer

OAuthAuthorizationServerOptions is the main asp.net identifier class. which you can find in this Microsoft.Owin.Security.OAuth namespace.

There is a request.method method in this library. It will display the name of the API method.

+3
source

Source: https://habr.com/ru/post/1273310/


All Articles