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

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

Constant Summary collapse

Types =
Dry::Types.module

Constants included from AwsAssumeRole

AwsAssumeRole::Config, DefaultProvider, VERSION

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from AwsAssumeRole

shared_config

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 Vendored::Aws::RefreshingCredentials

#credentials, #expiration, #refresh!

Constructor Details

#initialize(*options) ⇒ MfaSessionCredentials

Returns a new instance of MfaSessionCredentials.



24
25
26
27
28
29
30
# File 'lib/aws_assume_role/credentials/providers/mfa_session_credentials.rb', line 24

def initialize(*options)
    super(*options)
    @permanent_credentials ||= credentials
    @credentials = nil
    @serial_number = resolve_serial_number(serial_number)
    AwsAssumeRole::Vendored::Aws::RefreshingCredentials.instance_method(:initialize).bind(self).call(*options)
end

Instance Attribute Details

#permanent_credentialsObject (readonly)

Returns the value of attribute permanent_credentials.



13
14
15
# File 'lib/aws_assume_role/credentials/providers/mfa_session_credentials.rb', line 13

def permanent_credentials
  @permanent_credentials
end