mirror of
https://github.com/OMGeeky/yup-oauth2.git
synced 2026-01-20 17:21:03 +01:00
Unupdate the examples.
This commit is contained in:
@@ -34,7 +34,7 @@ fn main() {
|
||||
let authenticator = Authenticator::new(&secret,
|
||||
DefaultAuthenticatorDelegate,
|
||||
client,
|
||||
DiskTokenStorage::new("token_store.json")
|
||||
DiskTokenStorage::new(&"token_store.json".to_string())
|
||||
.unwrap(),
|
||||
Some(FlowType::InstalledInteractive));
|
||||
let client = hyper::Client::with_connector(
|
||||
|
||||
@@ -165,7 +165,7 @@ fn publish_stuff(methods: &PubsubMethods, message: &str) {
|
||||
// If called as '.../service_account pub', act as publisher; if called as '.../service_account
|
||||
// sub', act as subscriber.
|
||||
fn main() {
|
||||
let client_secret = oauth::service_account_key_from_file("pubsub-auth.json")
|
||||
let client_secret = oauth::service_account_key_from_file(&"pubsub-auth.json".to_string())
|
||||
.unwrap();
|
||||
let client = hyper::Client::with_connector(HttpsConnector::new(NativeTlsClient::new().unwrap()));
|
||||
let mut access = oauth::ServiceAccountAccess::new(client_secret, client);
|
||||
|
||||
Reference in New Issue
Block a user