Skip to content

Commit 43d9713

Browse files
authored
Merge pull request #24 from andreclaudino/feature/update-readme
Correct README.md
2 parents ad9e108 + af451b9 commit 43d9713

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ When running inside GCP the library can be asked without any further configurati
3737
provide a bearer token for the current service account of the service.
3838

3939
```rust
40+
let scopes = &["https://www.googleapis.com/auth/bigquery/"];
4041
let authentication_manager = gcp_auth::init().await?;
41-
let token = authentication_manager.get_token().await?;
42+
let token = authentication_manager.get_token(scopes).await?;
4243
```
4344

4445
## Custom service account
@@ -52,15 +53,16 @@ application at run time. The path to the configuration file is specified by the
5253

5354
```rust
5455
// With the GOOGLE_APPLICATION_CREDENTIALS environment variable set
56+
let scopes = &["https://www.googleapis.com/auth/bigquery/"];
5557
let authentication_manager = gcp_auth::init().await?;
56-
let token = authentication_manager.get_token().await?;
58+
let token = authentication_manager.get_token(&scopes).await?;
5759
```
5860

5961
## Local user authentication
6062

6163
This authentication method allows developers to authenticate again GCP when
6264
developing locally. Its use should be limited to development. Credentials can be
63-
set up using the `gcloud auth` utility. Credentials are read from file `~/.config/gcloud/ication_default_credentials.json`.
65+
set up using the `gcloud auth` utility. Credentials are read from file `~/.config/gcloud/application_default_credentials.json`.
6466

6567
## FAQ
6668

0 commit comments

Comments
 (0)