Commit Graph

41 Commits

Author SHA1 Message Date
Heng Xiong 1db30f6db1 Fix rubocop Ruby 1.9.3 compatibility issues 2017-07-12 17:11:49 -07:00
Heng Xiong 822435f616 Fix rubocop violations. Fix Travis build. 2017-07-12 15:57:12 -07:00
Kazuhiro Serizawa 35bef89588 rubocop autocorrect: Favor a normal if-statement 2017-02-25 23:24:59 +09:00
nicholas shook 82a4f8520c added ruby 2.3 compatability
also:

* updated rubocop and applied styling
* made small test refactorings (using the expect block notation)
* made a small refactor to remove an unnecessary ``return credentials``
* bumped the version
2016-07-13 15:45:46 -07:00
murgatroid99 5b483b07e7 Update version and changelog 2016-01-06 10:54:27 -08:00
murgatroid99 6991904343 Use lowercase :authorization for metadata key 2016-01-05 13:58:50 -08:00
Vijay Subramani ec7e118248 Update credentials_loader.rb 2015-12-31 15:48:39 -08:00
Tim Emiola c75d7398ff Merge pull request #54 from sqrrrl/0.5-dev
Prep for 0.5 release
2015-12-11 21:49:03 -08:00
Steven Bazyl 9b34943655 Fix rubocop errors with line length 2015-12-10 12:47:13 -08:00
Steven Bazyl b46a7dc82c Prep for 0.5 release, update unit tests to use webmock instead of Faraday stubs (due to fragility -- sensitive to internal changes made in signet) 2015-12-09 15:45:22 -08:00
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
Steven Bazyl cdc12a2c08 3LO support round 2 - web support 2015-10-14 14:26:21 -07:00
Steven Bazyl e903a12563 Base version of 3LO support. 2015-10-14 13:54:03 -07:00
Tim Emiola 2c76946922 Updates the changelog and version 2015-08-06 12:50:23 -07:00
Tim Emiola 19b32b47d8 Fixes styles issues before releasing
- also update .travis.yml to use new infrastructure
2015-08-06 12:50:23 -07:00
Tim Emiola 1463e5f5f9 Merge pull request #33 from mr-salty/add-system-default-creds-path
Add support for a system default credentials file.
2015-07-10 15:08:19 +02:00
Todd Derr 86de5fe13b Add support for a system default credentials file.
The path is:
  - windows: %ProgramData%\Google\Auth\application_default_credentials.json
  - other: /etc/google/auth/application_default_credentials.json
2015-06-29 16:35:45 -04:00
David Wilkie 15fbf92199 Fix bug where loading credentials from ENV doesn't set the credentials in the UserRefreshCredentials 2015-06-26 14:31:09 +07:00
Herbert Siojo 5061fb5add Enables reading credentials from env vars.
- ServiceAccountCredentials, ServiceAccountJwtHeaderCredentials
and UserRefreshCredentials initializers now take keyword args
via options hash.

- In `credentials_loader.rb`, refactored env var checking into
private methods

- Updated tests & added new tests.

- Fixed existing test for #from_well_known_path 'fails if
the file is invalid', where `from_env` was called instead of
`from_well_known_path`.

- Fixed rubocop errors I introduced, but two existing ones remain.

- Added entry to changelog.

- Fixed rubocop errors from code containing parallel assignments

- Updated rubocop_todo.yml to ignore parallel assignments and
trailing underscore assignments.
2015-05-21 13:38:19 -07:00
Tim Emiola 133e05cf4a Merge pull request #24 from tbetbetbe/ruby-auth-add-iam-creds
Adds an implementation of IAMCredentials
2015-04-30 14:47:15 -04:00
Tim Emiola f557108ad9 Release 0.4.1 2015-04-23 13:17:00 -07:00
Tim Emiola 194128d220 Updates conditional logic to use a case clause 2015-04-23 11:19:16 -07:00
Tim Emiola 98816f7b67 Adds more robust checking of the status code during compute engine auth.
Currently the implementation does not verify that a 200 response is received
before attempting to parse the JSON response.

This PR updates the behaviour to fail with an authorization error, similar to
how other auth library implementations.
2015-04-23 09:50:11 -07:00
Tim Emiola 1560686f3a Adds an implementation of IAMCredentials 2015-04-22 15:40:56 -07:00
Tim Emiola 7e522cfe13 Release 0.4.0 2015-03-25 20:08:14 -07:00
Tim Emiola c4bde552e6 Promote ServiceAccountCredentials when scope is nil
- if the ServiceAccountCredentials#apply is called when the scope is not set,
  authentication with the equivalent ServiceAccountJwtHeaderCredentials instance
  is attempted.
2015-03-23 21:35:07 -07:00
Tim Emiola 53ec6fce3b Splits the JWTHeader creds into its own class 2015-03-23 20:08:46 -07:00
Tim Emiola e3e33e2c38 Adds an implementation of JWT signing to ServiceAccountCredentials 2015-03-23 20:08:46 -07:00
Tim Emiola cb46aae999 Bump the version, as optional scopes changes the API. 2015-03-17 16:49:36 -07:00
Tim Emiola bd97c23d9f Make the scope optional 2015-03-17 16:46:55 -07:00
Tim Emiola 7a9dea37f1 Bump version 2015-03-12 14:49:18 -07:00
Tim Emiola 4d4bcd46e8 Add support for loading either credentials type as determined by the loaded content 2015-03-06 16:58:57 -08:00
Tim Emiola 3bd8751519 Adds a credential class that supports User Refresh Tokens 2015-03-06 15:46:59 -08:00
Tim Emiola df56f8af33 Refactoring: move the credentials load into its own class 2015-03-06 15:13:40 -08:00
Tim Emiola 21b0a3dead Ensures that the loaded files are closed 2015-02-24 14:57:12 -08:00
Tim Emiola 7adcf42958 Renamed the error vars 2015-02-17 18:43:00 -08:00
Tim Emiola f8fd5fa519 Corrects the rescue clause 2015-02-12 16:58:48 -08:00
Tim Emiola 1492408997 Adds funcs for json key from environment defaults
- adds support for path specified by an ENV var
- adds support for loading from a default path
2015-02-12 16:19:08 -08:00
Tim Emiola b01737abe2 Adds an explicit short timeout to on_gce?
- uses the current timeout in oauth2client/client.py
- includes the comments from that file as well
2015-02-11 21:03:37 -08:00
Tim Emiola e01b14cba8 Memoizes on_gce?
- also fixes an error in the gemspec.
2015-02-11 20:52:47 -08:00
Tim Emiola 3e60a713c5 Extract the auth library into its own project
- adds no new functionality beyond the initial attempt at providing
  Usable Auth constructors.

- adds enough packaging metadata to be able to export this library as a gem.

- next steps:
  complete usable auth implemntation of Application Default Credentials.
2015-02-11 19:23:34 -08:00