Revert mutable authenticator interface change

Instead, suggest using interior mutability (and RwLock in the example) to manage storage of token states. This makes it easier to share authenticators between threads.
This commit is contained in:
Daniel Rodgers-Pryor
2021-02-06 22:46:50 +11:00
parent 5ef498f801
commit 384963e091
5 changed files with 40 additions and 29 deletions

View File

@@ -44,7 +44,7 @@ async fn main() {
let sec = yup_oauth2::read_application_secret("client_secret.json")
.await
.expect("client secret couldn't be read.");
let mut auth = yup_oauth2::InstalledFlowAuthenticator::builder(
let auth = yup_oauth2::InstalledFlowAuthenticator::builder(
sec,
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
)