Method: Janus::Manager#authenticate

Defined in:
lib/janus/manager.rb

#authenticate(scope) ⇒ Object

Tries to authenticate the user using strategies, before returning the current user or nil.



14
15
16
17
# File 'lib/janus/manager.rb', line 14

def authenticate(scope)
  run_strategies(scope) unless authenticated?(scope)
  user(scope)
end