Update docs and version

This commit is contained in:
Matthew Scheirer 2018-12-06 17:25:23 -05:00
parent 428a00170f
commit 58b5cce552
2 changed files with 6 additions and 7 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "oidc" name = "oidc"
version = "0.1.0" version = "0.2.0"
authors = ["Zanny <lordzanny@gmail.com>"] authors = ["Zanny <lordzanny@gmail.com>"]
categories = ["web-programming", "authentication"] categories = ["web-programming", "authentication"]
description = "OpenID Connect client library using Reqwest, Biscuit, and inth-oauth2" description = "OpenID Connect client library using Reqwest, Biscuit, and inth-oauth2"

View File

@ -1,8 +1,7 @@
//! # OpenID Connect Client //! # OpenID Connect Client
//! //!
//! There are two ways to interact with this library - the batteries included magic methods, and //! There are two ways to interact with this library - the batteries included magic methods, and
//! the slightly more boilerplate but more fine grained ones. For most users the following is what //! the slightly more boilerplate fine grained ones. For most users the former is what you want:
//! you want.
//! //!
//! ```rust,ignore //! ```rust,ignore
//! use oidc; //! use oidc;
@ -11,12 +10,12 @@
//! //!
//! let id = "my client".to_string(); //! let id = "my client".to_string();
//! let secret = "a secret to everybody".to_string(); //! let secret = "a secret to everybody".to_string();
//! let redirect = reqwest::Url::parse("https://my-redirect.foo")?; //! let redirect = reqwest::Url::parse("https://my-redirect.foo/dest")?;
//! let issuer = oidc::issuer::google(); //! let issuer = oidc::issuer::google();
//! let client = oidc::discover(id, secret, redirect, issuer)?; //! let client = oidc::discover(id, secret, redirect, issuer)?;
//! let auth_url = client.auth_url(Default::default()); //! let auth_url = client.auth_url(Default::default());
//! //!
//! // ... send your user to auth_url, get an auth_code back at your redirect_url handler //! // ... send your user to auth_url, get an auth_code back at your redirect url handler
//! //!
//! let token = client.authenticate(auth_code, None, None)?; //! let token = client.authenticate(auth_code, None, None)?;
//! ``` //! ```
@ -33,7 +32,7 @@
//! //!
//! let id = "my client".to_string(); //! let id = "my client".to_string();
//! let secret = "a secret to everybody".to_string(); //! let secret = "a secret to everybody".to_string();
//! let redirect = reqwest::Url::parse("https://my-redirect.foo")?; //! let redirect = reqwest::Url::parse("https://my-redirect.foo/dest")?;
//! let issuer = oidc::issuer::google(); //! let issuer = oidc::issuer::google();
//! let http = reqwest::Client::new(); //! let http = reqwest::Client::new();
//! //!
@ -44,7 +43,7 @@
//! let client = oidc::new(id, secret, redirect, provider, jwks); //! let client = oidc::new(id, secret, redirect, provider, jwks);
//! let auth_url = client.auth_url(Default::default()); //! let auth_url = client.auth_url(Default::default());
//! //!
//! // ... send your user to auth_url, get an auth_code back at your redirect_url handler //! // ... send your user to auth_url, get an auth_code back at your redirect url handler
//! //!
//! let mut token = client.request_token(&http, auth_code)?; //! let mut token = client.request_token(&http, auth_code)?;
//! client.decode_token(&mut token)?; //! client.decode_token(&mut token)?;