Skip to content

Commit 5a1e48d

Browse files
andrebandjc
authored andcommitted
Update simple usage text README.md
The `AuthenticationManager` struct has been removed and replaced with the `provider()` method, making the instructions on `README.md` outdated. This PR is a minimal change to correct the documentation, based on the example in the rustdoc on lib.rs.
1 parent 1b2b682 commit 5a1e48d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,13 @@ This crate does not currently support Windows.
3535

3636
## Simple usage
3737

38-
The default way to use this library is to get instantiate an `AuthenticationManager`. It will
38+
The default way to use this library is to select the appropriate token provider using `provider()`. It will
3939
find the appropriate authentication method and use it to retrieve tokens.
4040

4141
```rust,no_run
42-
use gcp_auth::AuthenticationManager;
43-
44-
let authentication_manager = AuthenticationManager::new().await?;
42+
let provider = gcp_auth::provider().await?;
4543
let scopes = &["https://www.googleapis.com/auth/cloud-platform"];
46-
let token = authentication_manager.get_token(scopes).await?;
44+
let token = provider.token(scopes).await?;
4745
```
4846

4947
# License

0 commit comments

Comments
 (0)