Module: AwsMfaCredentials

Included in:
Aws::Credentials
Defined in:
lib/aws_mfa_secure/ext/aws.rb

Instance Method Summary collapse

Instance Method Details

#initialize(access_key_id, secret_access_key, session_token = nil, **kwargs) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/aws_mfa_secure/ext/aws.rb', line 5

def initialize(access_key_id, secret_access_key, session_token = nil, **kwargs)
  credentials = AwsMfaSecure::Credentials.instance
  if credentials.set?
    @access_key_id = credentials.access_key_id
    @secret_access_key = credentials.secret_access_key
    @session_token = credentials.session_token
  else
    super(access_key_id, secret_access_key, session_token, **kwargs)
  end
end