Skip to content

Commit

Permalink
Merge pull request #110 from hxiong388/update-readme
Browse files Browse the repository at this point in the history
Add service account example
  • Loading branch information
Heng Xiong committed Jul 13, 2017
2 parents 403deba + 608e9f9 commit 0f7fe1e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Expand Up @@ -131,6 +131,18 @@ end
# OK to use credentials
```

### Example (Service Account)

```ruby
scope = 'https://www.googleapis.com/auth/androidpublisher'

authorizer = Google::Auth::ServiceAccountCredentials.make_creds(
json_key_io: File.open('/path/to/service_account_json_key.json'),
scope: scope)

authorizer.fetch_access_token!
```

### Storage

Authorizers require a storage instance to manage long term persistence of
Expand Down

0 comments on commit 0f7fe1e

Please sign in to comment.