File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,9 @@ When running inside GCP the library can be asked without any further configurati
3737provide a bearer token for the current service account of the service.
3838
3939``` rust
40+ let scopes = & [" https://www.googleapis.com/auth/bigquery/" ];
4041let 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/" ];
5557let 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
6163This authentication method allows developers to authenticate again GCP when
6264developing 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
You can’t perform that action at this time.
0 commit comments