module VaultPlugin::Authentication

Public Instance Methods

auth_backend() click to toggle source
# File lib/smart_proxy_vault/authentication.rb, line 5
def auth_backend
  ::VaultPlugin::Plugin.settings.auth_backend.to_sym
end
auth_module() click to toggle source
# File lib/smart_proxy_vault/authentication.rb, line 9
def auth_module
  Object.const_get('::VaultPlugin::Authentication::' + auth_backend.capitalize.to_s)
end
authorized?() click to toggle source
# File lib/smart_proxy_vault/authentication.rb, line 20
def authorized?
  create_setting_accessors
  extend auth_module
  authorized?
end
create_setting_accessors() click to toggle source

Creates convenient accessor methods for all keys underneath auth_backend

# File lib/smart_proxy_vault/authentication.rb, line 14
def create_setting_accessors
  ::VaultPlugin::Plugin.settings[auth_backend].each do |key,value|
    define_singleton_method(key.to_sym) { value }
  end
end
vault_client() click to toggle source

Returns the human-readable identity for the requesting client Optionally used in a token's metadata & display-name

# File lib/smart_proxy_vault/authentication.rb, line 28
def vault_client
  extend auth_module
  vault_client
end