Reference documentation and code samples for the googleauth class Google::Auth::IAMCredentials.
Authenticates requests using IAM credentials.
Inherits
- Object
Methods
#apply
def
apply
(
a_hash
)
-
>
Hash
Returns a clone of a_hash updated with the authorization header
- a_hash(Hash) — The hash to clone and update with credentials
- (Hash) — A new hash with credentials
#apply!
def
apply!
(
a_hash
)
-
>
Hash
Adds the credential fields to the hash.
- a_hash(Hash) — The hash to update with credentials
- (Hash) — The updated hash with credentials
#initialize
def
initialize
(
selector
,
token
)
-
>
IAMCredentials
Initializes an IAMCredentials.
- selector(String) — The IAM selector.
- token(String) — The IAM token.
- ( IAMCredentials ) — a new instance of IAMCredentials
- (TypeError) — If selector or token is not a String
#updater_proc
def
updater_proc
()
-
>
Proc
Returns a reference to the #apply method, suitable for passing as a closure
- (Proc) — A procedure that updates a hash with credentials
Constants
SELECTOR_KEY
value: "x-goog-iam-authority-selector".freeze
TOKEN_KEY
value: "x-goog-iam-authorization-token".freeze

