Skip to content

Commit aa8fc7c

Browse files
author
Tim Emiola
committed
Update the docs and CHANGELOG to show that application default creds are available.
1 parent da6977f commit aa8fc7c

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.8.3
2+
* Adds support for authorization via Application Default Credentials.
3+
# Adds support for tracking coverage on coveralls.io
4+
15
# 0.8.2
26
* Fixes for file storage and missing cacerts file
37

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,19 @@ Credentials can be managed at the connection level, as shown, or supplied on a p
104104

105105
For server-to-server interactions, like those between a web application and Google Cloud Storage, Prediction, or BigQuery APIs, use service accounts.
106106

107+
As of version 0.8.3, service accounts can be configured using
108+
[Application Default Credentials][1], which rely on the credentials being
109+
available in a well-known location. If the credentials are not present
110+
and it's being used on a Compute Engine VM, it will use the VM's default credentials.
111+
112+
```ruby
113+
client.authorization = :google_app_default # in a later version, this will become the default
114+
client.authorization.fetch_access_token!
115+
client.execute(...)
116+
```
117+
118+
This is simpler API to use than in previous versions, although that is still available:
119+
107120
```ruby
108121
key = Google::APIClient::KeyUtils.load_from_pkcs12('client.p12', 'notasecret')
109122
client.authorization = Signet::OAuth2::Client.new(
@@ -201,3 +214,5 @@ See the full list of [samples on Github](https://github.com/google/google-api-ru
201214
## Support
202215

203216
Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
217+
218+
[1]: https://developers.google.com/accounts/docs/application-default-credentials

0 commit comments

Comments
 (0)