Class: Omnivault::V1CredentialProvider

Inherits:
Object
  • Object
show all
Includes:
AWS::Core::CredentialProviders::Provider
Defined in:
lib/omnivault/v1_credential_provider.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vault) ⇒ V1CredentialProvider

Returns a new instance of V1CredentialProvider.



9
10
11
# File 'lib/omnivault/v1_credential_provider.rb', line 9

def initialize(vault)
  @vault = vault
end

Instance Attribute Details

#vaultObject

Returns the value of attribute vault.



7
8
9
# File 'lib/omnivault/v1_credential_provider.rb', line 7

def vault
  @vault
end

Instance Method Details

#get_credentialsObject

rubocop:disable AccessorMethodName



14
15
16
17
18
19
# File 'lib/omnivault/v1_credential_provider.rb', line 14

def get_credentials
  {
    access_key_id: vault.fetch('AWS_ACCESS_KEY_ID'),
    secret_access_key: vault.fetch('AWS_SECRET_ACCESS_KEY')
  }
end