Class: LambdaVaultAuth
- Inherits:
-
Object
- Object
- LambdaVaultAuth
- Defined in:
- lib/lambda_vault_auth.rb
Overview
LambdaVaultAuth
Defined Under Namespace
Classes: Vaulter
Class Method Summary collapse
-
.vault ⇒ Object
LambdaVaultAuth.vault returns a wrapped vault which contains a few convenience accessors/helpers to help manage the lifecycle of a vault and access the credentials.
Class Method Details
.vault ⇒ Object
LambdaVaultAuth.vault returns a wrapped vault which contains a few convenience accessors/helpers to help manage the lifecycle of a vault and access the credentials
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/lambda_vault_auth.rb', line 81 def self.vault @vault ||= Vaulter.new return @vault.client unless @vault.expired? if @vault.renewable? && @vault.should_renew? @vault.renew! return @vault.client end # Otherwise, authenticate @vault.authenticate! # return the vault client directly @vault.client end |