Commit Graph

26 Commits

Author SHA1 Message Date
igorpeshansky 23f9b5071f Treat empty credentials environment variables as unset. (#205) 2019-03-27 10:55:08 -07:00
Graham Paye bf822910fa
add google-style and refactor (#203) 2019-03-15 12:34:54 -07:00
Daniel Azuma f0b95e72f9
Support configuration of the connection object used to fetch tokens (#185) 2019-01-02 14:42:42 -08:00
Graham Paye f0b0c6f8e8
Add project_id instance variable (#167) 2018-10-24 09:23:37 -07:00
Graham Paye 7e42656b1c
make tests windows friendly (#164) 2018-10-10 18:23:50 -07:00
Daniel Azuma 9232aa3176
Unescape private_key loaded from ENV (#132) 2018-06-05 09:56:48 -07:00
Jurriaan Pruis 2e9841e084 Support ruby-jwt 2.0
This version of ruby-jwt requires specification of the algorithm (see
jwt/ruby-jwt#184) for more information.

I've created a PR on signet to. That has to be merged before ruby-jwt
2.0 can be really used (see https://github.com/google/signet/pull/93).

Tested locally against ruby-jwt 2.0 and 1.5.6.
2017-09-16 01:11:12 +02:00
Heng Xiong f2b5b8ac98 Upgrade to new token URI 2017-07-17 11:14:06 -07: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
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
Steven Bazyl e903a12563 Base version of 3LO support. 2015-10-14 13:54:03 -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 f0de3295fc Fix some issues discovered by rubocop.
fix failures due to:
- misformatting of wrapped lines
- a superflous block (and temp dir creation) due to overzealous cut & paste.
2015-06-30 17:42:30 -04:00
Todd Derr 60a079a41e Fix 'raise_error' WARNINGs.
rspec spews a warning when using raise_error without a specific error;
add "RuntimeError" to all of these occurrences.
2015-06-29 16:50:55 -04: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
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 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 5f4cc99347 updates gem dependencies to the latest version 2015-03-23 16:36:46 -07:00
Tim Emiola bd97c23d9f Make the scope optional 2015-03-17 16:46:55 -07:00
Tim Emiola df56f8af33 Refactoring: move the credentials load into its own class 2015-03-06 15:13:40 -08:00
Tim Emiola e097a9cae9 Updates the tests work on ruby-1.9.3 and JRuby 2015-02-25 04:47:12 -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 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