Skip to content

Commit

Permalink
Merge pull request #24 from andreclaudino/feature/update-readme
Browse files Browse the repository at this point in the history
Correct README.md
  • Loading branch information
hrvolapeter authored Feb 2, 2021
2 parents ad9e108 + af451b9 commit 43d9713
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ When running inside GCP the library can be asked without any further configurati
provide a bearer token for the current service account of the service.

```rust
let scopes = &["https://www.googleapis.com/auth/bigquery/"];
let authentication_manager = gcp_auth::init().await?;
let token = authentication_manager.get_token().await?;
let token = authentication_manager.get_token(scopes).await?;
```

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

```rust
// With the GOOGLE_APPLICATION_CREDENTIALS environment variable set
let scopes = &["https://www.googleapis.com/auth/bigquery/"];
let authentication_manager = gcp_auth::init().await?;
let token = authentication_manager.get_token().await?;
let token = authentication_manager.get_token(&scopes).await?;
```

## Local user authentication

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

## FAQ

Expand Down

0 comments on commit 43d9713

Please sign in to comment.