Class: AwsMfaSecure::Unsets

Inherits:
Base
  • Object
show all
Defined in:
lib/aws_mfa_secure/unsets.rb

Instance Method Summary collapse

Methods inherited from Base

#aws_cli_installed?, #aws_cli_setup?, #aws_config, #aws_mfa_env_set?, #aws_profile, #credentials, #fetch_creds?, #get_session_token, #good_session_creds?, #iam_mfa?, #mfa_prompt, #mfa_serial, #save_creds, #session_creds_path, #shell_get_session_token, #sts

Constructor Details

#initialize(options = {}) ⇒ Unsets

Returns a new instance of Unsets.



3
4
5
# File 'lib/aws_mfa_secure/unsets.rb', line 3

def initialize(options={})
  @options = options
end

Instance Method Details

#runObject



7
8
9
# File 'lib/aws_mfa_secure/unsets.rb', line 7

def run
  puts script
end

#scriptObject



11
12
13
14
15
16
17
# File 'lib/aws_mfa_secure/unsets.rb', line 11

def script
  <<~EOL
    unset AWS_ACCESS_KEY_ID
    unset AWS_SECRET_ACCESS_KEY
    unset AWS_SESSION_TOKEN
  EOL
end