Go to file
Steve Bazyl 273be13333 Fix CLI snippet in class docs
Snippet was slightly outdated, based on an earlier revision.
2015-11-19 13:09:59 -08:00
lib Fix CLI snippet in class docs 2015-11-19 13:09:59 -08:00
spec Preload multijson adapter to avoid loading adapter while FakeFS enabled 2015-11-11 15:50:17 -08:00
.gitignore Ignore emacs backup files and Gemfile.lock 2015-02-11 19:19:47 -08:00
.rspec Adds top-level documentation and testing metadata 2015-02-24 18:20:43 -08:00
.rubocop.yml Add rubocop config files 2015-02-25 04:47:12 -08:00
.rubocop_todo.yml 3LO support round 2 - web support 2015-10-14 14:26:21 -07:00
.travis.yml Allow rbx failures due to rubocop crash. See rubinius/rubinius#3485 2015-10-14 16:36:29 -07:00
CHANGELOG.md fix typo of a contributor's name 2015-08-11 11:59:50 +09:00
CONTRIBUTING.md Adds a CHANGELOG.md 2015-03-23 16:13:42 -07:00
COPYING Adds top-level documentation and testing metadata 2015-02-24 18:20:43 -08:00
Gemfile 3LO support round 2 - web support 2015-10-14 14:26:21 -07:00
README.md Adds a version badge 2015-03-23 16:40:55 -07:00
Rakefile Adds bundler tasks 2015-02-24 22:34:27 -08:00
googleauth.gemspec Base version of 3LO support. 2015-10-14 13:54:03 -07:00

README.md

Google Auth Library for Ruby

Homepage
http://www.github.com/google/google-auth-library-ruby
Authors
Tim Emiola
Copyright
Copyright © 2015 Google, Inc.
License
Apache 2.0

Gem Version Build Status Coverage Status Dependency Status

Description

This is Google's officially supported ruby client library for using OAuth 2.0 authorization and authentication with Google APIs.

Alpha

This library is in Alpha. We will make an effort to support the library, but we reserve the right to make incompatible changes when necessary.

Install

Be sure https://rubygems.org/ is in your gem sources.

For normal client usage, this is sufficient:

$ gem install googleauth

Example Usage

require 'googleauth'

# Get the environment configured authorization
scopes =  ['https://www.googleapis.com/auth/cloud-platform', 'https://www.googleapis.com/auth/compute']
authorization = Google::Auth.get_application_default(scopes)

# Add the the access token obtained using the authorization to a hash, e.g
# headers.
some_headers = {}
authorization.apply(some_headers)

Application Default Credentials

This library provides an implementation of application default credentials for Ruby.

The Application Default Credentials provide a simple way to get authorization credentials for use in calling Google APIs.

They are best suited for cases when the call needs to have the same identity and authorization level for the application independent of the user. This is the recommended approach to authorize calls to Cloud APIs, particularly when you're building an application that uses Google Compute Engine.

What about auth in google-apis-ruby-client?

The goal is for all auth done by google-apis-ruby-client to be performed by this library. I.e, eventually google-apis-ruby-client will just take a dependency on this library. This update is a work in progress, but should be completed by Q2 2015.

License

This library is licensed under Apache 2.0. Full license text is available in COPYING.

Contributing

See CONTRIBUTING.

Support

Please report bugs at the project on Github. Don't hesitate to ask questions about the client or APIs on StackOverflow.