class Kubeclient::GoogleApplicationDefaultCredentials
Get a bearer token from the Google's application default credentials.
Public Class Methods
token()
click to toggle source
# File lib/kubeclient/google_application_default_credentials.rb, line 6 def token require 'googleauth' scopes = ['https://www.googleapis.com/auth/cloud-platform'] authorization = Google::Auth.get_application_default(scopes) authorization.apply({}) authorization.access_token end