Module: MiniAuth::Guarded

Extended by:
ActiveSupport::Concern
Defined in:
lib/mini_auth/guarded.rb

Instance Method Summary collapse

Instance Method Details

#auth_guard(name = nil) ⇒ MiniAuth::Guard

Returns:



13
14
15
# File 'lib/mini_auth/guarded.rb', line 13

def auth_guard(name = nil)
  auth_manager.fetch_guard(request, name)
end

#auth_managerMiniAuth::AuthManager



8
9
10
# File 'lib/mini_auth/guarded.rb', line 8

def auth_manager
  @auth_manager ||= MiniAuth::AuthManager.instance
end

#current_userObject



17
18
19
# File 'lib/mini_auth/guarded.rb', line 17

def current_user
  auth_guard.user
end