Class: AwsAssumeRole::Credentials::Providers::MfaSessionCredentials

Inherits:
Dry::Struct
  • Object
show all
Includes:
Logging, Ui, Vendored::Aws::CredentialProvider, Vendored::Aws::RefreshingCredentials
Defined in:
lib/aws_assume_role/credentials/providers/mfa_session_credentials.rb

Constant Summary

Constants included from AwsAssumeRole

AwsAssumeRole::Config, DefaultProvider, VERSION

Instance Method Summary collapse

Methods included from Logging

included

Methods included from Ui

ask_with_validation, error, input, out, pastel, show_validation_errors, t, validation_errors_to_s

Methods included from AwsAssumeRole

shared_config

Methods included from Vendored::Aws::RefreshingCredentials

#credentials, #expiration, #refresh!

Constructor Details

#initialize(options) ⇒ MfaSessionCredentials

Returns a new instance of MfaSessionCredentials.


29
30
31
32
33
34
35
# File 'lib/aws_assume_role/credentials/providers/mfa_session_credentials.rb', line 29

def initialize(options)
    options.each { |key, value| instance_variable_set("@#{key}", value) }
    @permanent_credentials ||= credentials
    @credentials = nil
    @serial_number = resolve_serial_number(serial_number)
    AwsAssumeRole::Vendored::Aws::RefreshingCredentials.instance_method(:initialize).bind(self).call(options)
end