Token Method in ASP.NET, Accepting every HTTP meth

2019-07-11 18:36发布

I am trying curl, These requests are storming my brain. The environment, I am using is 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 are giving the same output, But in case of POST-MAN(UI interface for requesting API-call's) Only POST call is working and GET call is blocked.I tried to GET-METHOD though knowing that it is not correct syntax, expected a fail-case but it has succeeded. CorsMiddleware Class, I had used for enable configuration setup for my API's.

1条回答
Root(大扎)
2楼-- · 2019-07-11 18:50

OAuthAuthorizationServerOptions is asp.net identity core class. which you can find under this namespace Microsoft.Owin.Security.OAuth.

There is a method in this library, request.method. It will show the API method name.

查看更多
登录 后发表回答