Skip to content

liuyunlynn/WebApiOwinOAuth

Repository files navigation

WebApi Owin OAuth

Useage

The WebApiOwinOAuth is the server and OwinOauthClient is the client(Windows Form) So should run the two application at the same time.

Firstly, you should change the baesurl in the client,like this:

private readonly string _baseUrl = "http://localhost:44367/api/";

image
If you are not authorized, Click 'Get User' button, the result will show Unauthorized
image
If you input the incorrect user name and password, the result will display Bad request.
image
Also, Click 'Get User' button, the result will show Unauthorized
image
Input correct user name and password, click 'Validate User' buton, the result will display access token
image
And Click 'Get User' button, the result will show right result