Module: FaceDetect::Adapter::Google::AuthHelper
- Defined in:
- lib/face_detect/adapter/google/auth_helper.rb
Class Method Summary collapse
Class Method Details
.authorization ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/face_detect/adapter/google/auth_helper.rb', line 17 def key_io = StringIO.new(credentials) ::Google::Auth::ServiceAccountCredentials.make_creds( json_key_io: key_io, scope: scopes ) end |
.credentials ⇒ Object
13 14 15 |
# File 'lib/face_detect/adapter/google/auth_helper.rb', line 13 def credentials ENV.fetch('GOOGLE_CREDENTIALS_JSON') end |
.scopes ⇒ Object
9 10 11 |
# File 'lib/face_detect/adapter/google/auth_helper.rb', line 9 def scopes ['https://www.googleapis.com/auth/cloud-platform'] end |