class Occi::Api::Client::Http::AuthnPlugins::Basic

Public Class Methods

new(env_ref, options = {}) click to toggle source
# File lib/occi/api/client/http/authn_plugins/basic.rb, line 7
def initialize(env_ref, options = {})
  super env_ref, options
  @fallbacks = %w(keystone)
end

Public Instance Methods

setup(options = {}) click to toggle source
# File lib/occi/api/client/http/authn_plugins/basic.rb, line 12
def setup(options = {})
  # set up basic auth
  raise ArgumentError, "Missing required options 'username' and 'password' for basic auth!" unless @options[:username] && @options[:password]
  @env_ref.class.basic_auth @options[:username], @options[:password]
end