Class: Kubeclient::GoogleApplicationDefaultCredentials
- Inherits:
-
Object
- Object
- Kubeclient::GoogleApplicationDefaultCredentials
- Defined in:
- lib/kubeclient/google_application_default_credentials.rb
Overview
Get a bearer token from the Google’s application default credentials.
Class Method Summary collapse
Class Method Details
.token ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/kubeclient/google_application_default_credentials.rb', line 7 def token require 'googleauth' scopes = ['https://www.googleapis.com/auth/cloud-platform'] = Google::Auth.get_application_default(scopes) .apply({}) .access_token end |