class Occi::Api::Client::Http::AuthnPlugins::Base
Attributes
env_ref[R]
fallbacks[R]
options[R]
Public Class Methods
new(env_ref, options = {})
click to toggle source
# File lib/occi/api/client/http/authn_plugins/base.rb, line 10 def initialize(env_ref, options = {}) @options = options @env_ref = env_ref @fallbacks = [] end
Public Instance Methods
authenticate(options = {})
click to toggle source
# File lib/occi/api/client/http/authn_plugins/base.rb, line 18 def authenticate(options = {}) response = @env_ref.class.get("#{@env_ref.endpoint.to_s}/-/") raise ::Occi::Api::Client::Errors::AuthnError, "Authentication failed with code #{response.code.to_s}!" unless response.success? end
setup(options = {})
click to toggle source
# File lib/occi/api/client/http/authn_plugins/base.rb, line 16 def setup(options = {}); end