mirror of
https://github.com/OMGeeky/yup-oauth2.git
synced 2026-02-23 15:50:00 +01:00
chore(serde): update to serde 0.5.0
Serde move all json code into a separate crate, which we are now pulling in separately.
This commit is contained in:
@@ -190,7 +190,7 @@ pub mod tests {
|
||||
|
||||
#[test]
|
||||
fn console_secret() {
|
||||
use serde::json;
|
||||
use serde_json as json;
|
||||
match json::from_str::<ConsoleApplicationSecret>(SECRET) {
|
||||
Ok(s) => assert!(s.installed.is_some() && s.web.is_none()),
|
||||
Err(err) => panic!(err),
|
||||
|
||||
@@ -7,7 +7,7 @@ use hyper;
|
||||
use hyper::header::ContentType;
|
||||
use url::form_urlencoded;
|
||||
use itertools::Itertools;
|
||||
use serde::json;
|
||||
use serde_json as json;
|
||||
use chrono::{DateTime,UTC};
|
||||
use std::borrow::BorrowMut;
|
||||
use std::io::Read;
|
||||
|
||||
@@ -481,7 +481,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn flow() {
|
||||
use serde::json;
|
||||
use serde_json as json;
|
||||
|
||||
let secret = json::from_str::<ConsoleApplicationSecret>(SECRET).unwrap().installed.unwrap();
|
||||
let res = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
//! extern crate serde;
|
||||
//!
|
||||
//! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, PollInformation, ConsoleApplicationSecret, MemoryStorage, GetToken};
|
||||
//! use serde::json;
|
||||
//! use serde_json as json;
|
||||
//! use std::default::Default;
|
||||
//! # const SECRET: &'static str = "{\"installed\":{\"auth_uri\":\"https://accounts.google.com/o/oauth2/auth\",\"client_secret\":\"UqkDJd5RFwnHoiG5x5Rub8SI\",\"token_uri\":\"https://accounts.google.com/o/oauth2/token\",\"client_email\":\"\",\"redirect_uris\":[\"urn:ietf:wg:oauth:2.0:oob\",\"oob\"],\"client_x509_cert_url\":\"\",\"client_id\":\"14070749909-vgip2f1okm7bkvajhi9jugan6126io9v.apps.googleusercontent.com\",\"auth_provider_x509_cert_url\":\"https://www.googleapis.com/oauth2/v1/certs\"}}";
|
||||
//!
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
extern crate serde;
|
||||
extern crate serde_json;
|
||||
|
||||
extern crate chrono;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ use device::GOOGLE_TOKEN_URL;
|
||||
use chrono::UTC;
|
||||
use hyper;
|
||||
use hyper::header::ContentType;
|
||||
use serde::json;
|
||||
use serde_json as json;
|
||||
use url::form_urlencoded;
|
||||
use super::Token;
|
||||
use std::borrow::BorrowMut;
|
||||
|
||||
Reference in New Issue
Block a user