lib/googleauth/service_account.rb
References a Google API hostReferences a sensitive Ruby environment variable
SHA-256e744a27e3d5908b1fc7fbd117d12a46b66cab3d5ff8752a292b623449685010f
MaleculeH₂(CmOs)
Evidence
1# Copyright 2015 Google, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/L …
11:46… D, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15require "googleauth/signet"
16require "googleauth/credentials_l …
21
22module Google
23 # Module Auth provides classes that provide Google-specific authorization
24 # used to access Google APIs.
25 module Auth
26 # Authe …
33:83… ation/production)
34 class ServiceAccountCredentials < Signet::OAuth2::Client
35 TOKEN_CRED_URI = "https://www.googleapis.com/oauth2/v4/token".freeze
36 extend CredentialsLoader
37 extend JsonKeyReader
38 attr_reader :project_id
39 attr_reader :qu …
56:94… n_key json_key_io
57 else
58 private_key = unescape ENV[CredentialsLoader::PRIVATE_KEY_VAR]
59 client_email = ENV[CredentialsLoader::CLIENT_EMAIL_VAR]
60 project_id = ENV[CredentialsLoader::PROJECT_ID …