Class: Armrest::Auth

Inherits:
Object
  • Object
show all
Includes:
Logging
Defined in:
lib/armrest/auth.rb

Instance Method Summary collapse

Methods included from Logging

#default_logger, #logger, #logger=

Constructor Details

#initialize(options = {}) ⇒ Auth

Returns a new instance of Auth.



5
6
7
# File 'lib/armrest/auth.rb', line 5

def initialize(options={})
  @options = options
end

Instance Method Details

#providerObject



9
10
11
12
13
14
15
16
17
18
# File 'lib/armrest/auth.rb', line 9

def provider
  providers.each do |meth|
    provider = send(meth)
    if provider
      logger.debug "Resolved auth provider: #{provider}"
      return provider
    end
  end
  nil
end