versionone - OAuth2Client 1.5.0.2558

A simple client-only OAuth2 library for .NET. This library is designed to be used with minimal implementation by the user, in environments that are not hosted on a web server.

PM> Install-Package OAuth2Client -Version 1.5.0.2558 -Source https://www.myget.org/F/versionone/api/v3/index.json

Copy to clipboard

> nuget.exe install OAuth2Client -Version 1.5.0.2558 -Source https://www.myget.org/F/versionone/api/v3/index.json

Copy to clipboard

> dotnet add package OAuth2Client --version 1.5.0.2558 --source https://www.myget.org/F/versionone/api/v3/index.json

Copy to clipboard
<PackageReference Include="OAuth2Client" Version="1.5.0.2558" />
Copy to clipboard
source https://www.myget.org/F/versionone/api/v3/index.json

nuget OAuth2Client  ~> 1.5.0.2558
Copy to clipboard

> choco install OAuth2Client --version 1.5.0.2558 --source https://www.myget.org/F/versionone/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "versionone" -SourceLocation "https://www.myget.org/F/versionone/api/v2"
Install-Module -Name "OAuth2Client" -RequiredVersion "1.5.0.2558" -Repository "versionone" 
Copy to clipboard

OAuth2Client.Net

Basic OAuth2 client for .NET providing an easy way to authenticate to OAuth2-protected endpoints.

What It Does

  • Does allow your service to simply act as a client and authenticate against VersionOne or another OAuth2 host.

  • Does use simple JSON credential storage, modeled after the google oauth2 python library.

  • Does allow you to customize the storage implementation, but comes with a reasonable default.

  • Does provide an extension to System.Net.Http.HttpClient that gives you a ready-for-OAuth2 HttpClient.

  • Does provide both synchronous and asynchronous methods, in case you can't use async.

  • Does support the Out-Of-Band flow for services that don't have a public listening HTTP endpoint.

What It Doesn't

  • Does not require you to be running inside an IIS or any other webserver

  • Does not open or use a listening HTTP endpoint

  • Does not require your code to have any kind of user-visible UI.

  • Does not want to pass your user through to Facebook or Google or Twitter for "identity"

  • Does not require implementation of lots of interfaces or mixing a dozen methods into a predefined flow.

How to run the examples

Read EXAMPLES.md for details on how to get the example projects running.

Getting started in your own project

  • Add the OAuth2Client and VersionOne.SDK.APIClient.Net dependencies to your project via NuGet

  • Create a client or app identity on the host that we'll be authenticating to.

  • download the client_secrets.json file from the host, or construct one by hand.

  • run the command-line tool to generate a grant URL, and follow that url to allow the permissions

  • copy and paste the credentials into the command line tool, producing a stored_credentials.json file

  • put the resulting client_secrets.json and stored_credentials.json file where the client code can find them

    • Either in the CWD of the running code

    • or specified by the environment variables OAUTH2_SECRETS / OAUTH2_CREDS

    • or loaded by your implementation of OAuth2Client.IStorage which will return OAuth2Client.Secrets and OAuth2Client.Credentials objects.

  • instantiate a V1OAuth2APIConnector

    • Provide an OAuth2Client.IStorage instead of any username/password details

    • The connector will load the credentials from the Storage and will apply them to outbound requests

    • if a request fails due to 401, it will refresh the token and retry the request once.

      • if the refresh fails (e.g. the app entry has been suspended or deleted), the refresh will fail.
  • Use the V1OAuth2APIConnector where you would use a V1APIConnector

1.5 - Added IAuthenticationModule-compatible adapter to use with System.Net.WebRequest and friends. 1.4 - added proxy and handler arguments to authclient constructor 1.2 - cleaned up extension methods and examples

  • Any 0.0
    • FSharp.Data (>= 1.1.9)
  • .NETFramework 4.5: 4.5.0.0

Owners

Josh Gough

Authors

VersionOne, Inc.

Project URL

https://github.com/versionone/OAuth2Client.Net

License

BSD-3-Clause

Tags

OAuth2 Oauth versionone

Info

360 total downloads
17 downloads for version 1.5.0.2558
Download (52.13 KB)
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
1.6.1.2571 52.19 KB Thu, 31 Jul 2014 19:23:53 GMT 54
1.6.1.2570 52.21 KB Thu, 31 Jul 2014 18:46:39 GMT 16
1.6.1.2567 52.18 KB Tue, 11 Mar 2014 19:52:57 GMT 38
1.6.1.2566 52.17 KB Fri, 31 Jan 2014 19:19:16 GMT 36
1.6.1.2565 52.18 KB Fri, 31 Jan 2014 16:38:44 GMT 10
1.6.1.2564 52.18 KB Thu, 30 Jan 2014 20:52:49 GMT 17
1.6.1.2563 52.18 KB Thu, 30 Jan 2014 20:14:50 GMT 14
1.6.0.2561 52.29 KB Tue, 14 Jan 2014 20:59:09 GMT 46
1.5.0.2558 52.13 KB Mon, 09 Dec 2013 19:38:09 GMT 17
1.5.0.2557 52.46 KB Fri, 06 Dec 2013 16:02:46 GMT 20
1.5.0.2556 52.45 KB Fri, 06 Dec 2013 15:23:40 GMT 16
1.5.0.2555 52.59 KB Fri, 06 Dec 2013 14:58:54 GMT 14
1.5.0.2554 52.46 KB Thu, 05 Dec 2013 22:24:06 GMT 10
1.5.0.0 52.46 KB Thu, 05 Dec 2013 22:12:53 GMT 8
1.4.13309.2515 47.83 KB Tue, 05 Nov 2013 21:23:17 GMT 21
1.4.13260.2514 47.79 KB Tue, 17 Sep 2013 20:58:58 GMT 23