From 30ad51a1737c78af756826a7e56ee0d870ce77dd Mon Sep 17 00:00:00 2001 From: thaven Date: Sat, 3 Jun 2017 10:14:59 +0200 Subject: [PATCH] Update README.md --- README.md | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5806377..09f2dd0 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,24 @@ The `oauth` package provides an implementation of the [OAuth 2.0 Authorization framework][RFC6749]. -This package is in early development phase. Subsequent versions may not be fully -compatible. Especially between versions 0.0.1 and 0.1.0 the API changed a lot. +This package is stabilizing, but not quite 1.0 yet. Subsequent versions may not +be fully compatible. Especially between versions 0.0.1 and 0.1.0 the API changed +a lot. In 0.2.0 the `oauth.client` module has been split out into multiple +modules and a few methods moved to another class (e.g. `OAuthSession.load` +instead of `OAuthSettings.loadSession`). The old names are deprecated. + +# Vibe.d version requirements +- oauth 0.1.x: vibe.d ~>0.7.29 +- oauth 0.2.x: vibe.d ~>0.8.0-beta.6 # API Overview Full documentation is in the source, here is just an overview of the 0.1.0+ API. -You'll need at least one `OAuthProvider`. Support for Facebook, Google and Azure -is included, though the latter two are to be considered beta. You generally -don't reference instances of this class directly, except when registering a -custom provider. +You'll need at least one `OAuthProvider`. Support for Facebook, Google, Azure +and GitHub is included, and it's easy to add your own. You generally don't +reference `OAuthProvider` instances directly, except when registering a custom +provider. An `OAuthSettings` instance contains application-specific settings, such as the client id, for use with a particular provider. Also it provides methods to @@ -22,6 +29,10 @@ obtain authorization using these settings. If authorization is successful, an to. When the authorization code is received, through redirection back to the application, call `userSession` to obtain the `OAuthSession`. +For convenience, there is also `OAuthWebapp` which provides a reference +implementation for three-legged OAuth. Since oauth 0.2.0 this is compatible with +the `vibe.web.auth` module. + An `OAuthSession` holds an access token and optionally a refresh token. Use its `authorizeRequest` method to apply the access token to an [HTTPClientRequest](http://vibed.org/api/vibe.http.client/HTTPClientRequest).