From 9e45fd6b75467cbe2307e1b933e4e10008848801 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Sat, 28 Nov 2015 04:20:40 -0500 Subject: [PATCH] Add a bit of documentation --- src/client.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/client.rs b/src/client.rs index d5f4a23..f2f4f7b 100644 --- a/src/client.rs +++ b/src/client.rs @@ -1,8 +1,8 @@ -//! OAuth2 client. +//! OAuth 2.0 client. use url::{Url, ParseResult}; -/// OAuth2 client. +/// OAuth 2.0 client. pub struct Client { auth_uri: String, token_uri: String, @@ -13,6 +13,7 @@ pub struct Client { } impl Client { + /// Creates an OAuth 2.0 client. pub fn new>( auth_uri: S, token_uri: S, @@ -30,6 +31,7 @@ impl Client { } } + /// Creates a Google OAuth 2.0 client. pub fn google>( client_id: S, client_secret: S, @@ -45,6 +47,7 @@ impl Client { } } + /// Constructs an authorization request URI. pub fn auth_uri(&self, scope: Option<&str>, state: Option<&str>) -> ParseResult { let mut uri = try!(Url::parse(&self.auth_uri));