Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,13 @@ This crate does not currently support Windows.

## Simple usage

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

```rust,no_run
use gcp_auth::AuthenticationManager;

let authentication_manager = AuthenticationManager::new().await?;
let provider = gcp_auth::provider().await?;
let scopes = &["https://www.googleapis.com/auth/cloud-platform"];
let token = authentication_manager.get_token(scopes).await?;
let token = provider.token(scopes).await?;
```

# License
Expand Down