Method: Google::Auth::ExternalAccount::AwsCredentials#initialize

Defined in:
lib/googleauth/external_account/aws_credentials.rb

#initialize(options = {}) ⇒ AwsCredentials

Returns a new instance of AwsCredentials.



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/googleauth/external_account/aws_credentials.rb', line 38

def initialize options = {}
  base_setup options

  @audience = options[:audience]
  @credential_source = options[:credential_source] || {}
  @environment_id = @credential_source[:environment_id]
  @region_url = @credential_source[:region_url]
  @credential_verification_url = @credential_source[:url]
  @regional_cred_verification_url = @credential_source[:regional_cred_verification_url]
  @imdsv2_session_token_url = @credential_source[:imdsv2_session_token_url]

  # These will be lazily loaded when needed, or will raise an error if not provided
  @region = nil
  @request_signer = nil
  @imdsv2_session_token = nil
  @imdsv2_session_token_expiry = nil
end