mirror of
https://github.com/OMGeeky/yup-oauth2.git
synced 2026-01-24 19:00:27 +01:00
refactor(deps): Remove dependency on openssl.
This commit is contained in:
@@ -7,6 +7,6 @@ edition = "2018"
|
||||
[dependencies]
|
||||
yup-oauth2 = { path = "../../" }
|
||||
hyper = "0.12"
|
||||
hyper-tls = "0.3"
|
||||
hyper-rustls = "0.16"
|
||||
futures = "0.1"
|
||||
tokio = "0.1"
|
||||
|
||||
@@ -2,7 +2,7 @@ use futures::prelude::*;
|
||||
use yup_oauth2::{self, Authenticator, GetToken};
|
||||
|
||||
use hyper::client::Client;
|
||||
use hyper_tls::HttpsConnector;
|
||||
use hyper_rustls::HttpsConnector;
|
||||
use std::path;
|
||||
use std::time::Duration;
|
||||
use tokio;
|
||||
@@ -10,7 +10,7 @@ use tokio;
|
||||
fn main() {
|
||||
let creds = yup_oauth2::read_application_secret(path::Path::new("clientsecret.json"))
|
||||
.expect("clientsecret");
|
||||
let https = HttpsConnector::new(1).expect("tls");
|
||||
let https = HttpsConnector::new(1);
|
||||
let client = Client::builder()
|
||||
.keep_alive(false)
|
||||
.build::<_, hyper::Body>(https);
|
||||
|
||||
@@ -7,6 +7,6 @@ edition = "2018"
|
||||
[dependencies]
|
||||
yup-oauth2 = { path = "../../" }
|
||||
hyper = "0.12"
|
||||
hyper-tls = "0.3"
|
||||
hyper-rustls = "0.16"
|
||||
futures = "0.1"
|
||||
tokio = "0.1"
|
||||
|
||||
@@ -3,12 +3,12 @@ use yup_oauth2::GetToken;
|
||||
use yup_oauth2::{Authenticator, InstalledFlow};
|
||||
|
||||
use hyper::client::Client;
|
||||
use hyper_tls::HttpsConnector;
|
||||
use hyper_rustls::HttpsConnector;
|
||||
|
||||
use std::path::Path;
|
||||
|
||||
fn main() {
|
||||
let https = HttpsConnector::new(1).expect("tls");
|
||||
let https = HttpsConnector::new(1);
|
||||
let client = Client::builder()
|
||||
.keep_alive(false)
|
||||
.build::<_, hyper::Body>(https);
|
||||
|
||||
@@ -7,6 +7,6 @@ edition = "2018"
|
||||
[dependencies]
|
||||
yup-oauth2 = { path = "../../" }
|
||||
hyper = "0.12"
|
||||
hyper-tls = "0.3"
|
||||
hyper-rustls = "0.16"
|
||||
futures = "0.1"
|
||||
tokio = "0.1"
|
||||
|
||||
@@ -4,7 +4,7 @@ use futures::prelude::*;
|
||||
use yup_oauth2::GetToken;
|
||||
|
||||
use hyper::client::Client;
|
||||
use hyper_tls::HttpsConnector;
|
||||
use hyper_rustls::HttpsConnector;
|
||||
use tokio;
|
||||
|
||||
use std::path;
|
||||
@@ -12,7 +12,7 @@ use std::path;
|
||||
fn main() {
|
||||
let creds =
|
||||
yup_oauth2::service_account_key_from_file(path::Path::new("serviceaccount.json")).unwrap();
|
||||
let https = HttpsConnector::new(1).expect("tls");
|
||||
let https = HttpsConnector::new(1);
|
||||
let client = Client::builder()
|
||||
.keep_alive(false)
|
||||
.build::<_, hyper::Body>(https);
|
||||
|
||||
Reference in New Issue
Block a user