googleauth - Class Google::Auth::IAMCredentials (v1.15.0) Stay organized with collections Save and categorize content based on your preferences.
Reference documentation and code samples for the googleauth class Google::Auth::IAMCredentials.
Authenticates requests using IAM credentials.
Inherits
- Object
Methods
#apply
defapply(a_hash)->HashReturns 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!
defapply!(a_hash)->HashAdds the credential fields to the hash.
- a_hash (Hash) — The hash to update with credentials
- (Hash) — The updated hash with credentials
#initialize
definitialize(selector,token)->IAMCredentialsInitializes 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
defupdater_proc()->ProcReturns a reference to the #apply method, suitable for passing asa 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
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 UTC.