Sample Console Application using Resource Owner Password

Download Sample Source

For non-web applications that cannot use the HTTP redirection flows, a user identifying Access Token can be obtained from the Authorization Server using the Resource Owner OAuth Flow. This uses the Client ID and Client Secret that the application developer registered on CodeProject to validate the client, and the user's email and password to validate the user.

Note: The demos use a pre-registered Client ID and Client Secret. For your apps, you will need to register your own. Information about registering a Client ID and Client Secret can be found here.

The following code demonstrates a C# console application that gets an Access Token using Resource Owner credentials, and then queries the server for the