mirror of
https://github.com/OMGeeky/yup-oauth2.git
synced 2026-01-03 09:55:05 +01:00
chore(serde): upgrade to latest version for stable
Now it builds with stable too, it appears.
This commit is contained in:
28
Cargo.lock
generated
28
Cargo.lock
generated
@@ -13,7 +13,7 @@ dependencies = [
|
||||
"serde_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_macros 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syntex 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syntex 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"yup-hyper-mock 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@@ -26,11 +26,6 @@ dependencies = [
|
||||
"syntex_syntax 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "0.5.0"
|
||||
@@ -376,14 +371,6 @@ dependencies = [
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syntex"
|
||||
version = "0.28.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"syntex_syntax 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syntex"
|
||||
version = "0.32.0"
|
||||
@@ -392,19 +379,6 @@ dependencies = [
|
||||
"syntex_syntax 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syntex_syntax"
|
||||
version = "0.28.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"term 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syntex_syntax"
|
||||
version = "0.32.0"
|
||||
|
||||
@@ -27,7 +27,7 @@ nightly = ["serde_macros"]
|
||||
with_syntex = ["serde_codegen", "syntex"]
|
||||
|
||||
[build-dependencies]
|
||||
syntex = { version = "=0.28.0", optional = true }
|
||||
syntex = { version = "=0.32.0", optional = true }
|
||||
serde_codegen = { version = "0.7.5", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
17
src/lib.rs
17
src/lib.rs
@@ -1,10 +1,13 @@
|
||||
//! This library can be used to acquire oauth2.0 authentication for services.
|
||||
//! At the time of writing, only one way of doing so is implemented, the [device flow](https://developers.google.com/youtube/v3/guides/authentication#devices), along with a flow
|
||||
//! At the time of writing, only one way of doing so is implemented, the
|
||||
//! [device flow](https://developers.google.com/youtube/v3/guides/authentication#devices), along
|
||||
//! with a flow
|
||||
//! for [refreshing tokens](https://developers.google.com/youtube/v3/guides/authentication#devices)
|
||||
//!
|
||||
//!
|
||||
//! For your application to use this library, you will have to obtain an application
|
||||
//! id and secret by [following this guide](https://developers.google.com/youtube/registering_an_application).
|
||||
//!
|
||||
//! id and secret by
|
||||
//! [following this guide](https://developers.google.com/youtube/registering_an_application).
|
||||
//!
|
||||
//! # Device Flow Usage
|
||||
//! As the `DeviceFlow` involves polling, the `DeviceFlowHelper` should be used
|
||||
//! as means to adhere to the protocol, and remain resilient to all kinds of errors
|
||||
@@ -19,7 +22,7 @@
|
||||
//! extern crate yup_oauth2 as oauth2;
|
||||
//! extern crate serde;
|
||||
//! extern crate serde_json;
|
||||
//!
|
||||
//!
|
||||
//! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, PollInformation, ConsoleApplicationSecret, MemoryStorage, GetToken};
|
||||
//! use serde_json as json;
|
||||
//! use std::default::Default;
|
||||
@@ -34,7 +37,7 @@
|
||||
//! match res {
|
||||
//! Ok(t) => {
|
||||
//! // now you can use t.access_token to authenticate API calls within your
|
||||
//! // given scopes. It will not be valid forever, which is when you have to
|
||||
//! // given scopes. It will not be valid forever, which is when you have to
|
||||
//! // refresh it using the `RefreshFlow`
|
||||
//! },
|
||||
//! Err(err) => println!("Failed to acquire token: {}", err),
|
||||
@@ -68,4 +71,4 @@
|
||||
include!("lib.rs.in");
|
||||
|
||||
#[cfg(feature = "with_syntex")]
|
||||
include!(concat!(env!("OUT_DIR"), "/lib.rs"));
|
||||
include!(concat!(env!("OUT_DIR"), "/lib.rs"));
|
||||
|
||||
Reference in New Issue
Block a user