Module: MiniAuth::Guarded
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/mini_auth/guarded.rb
Instance Method Summary collapse
- #auth_guard(name = nil) ⇒ MiniAuth::Guard
- #auth_manager ⇒ MiniAuth::AuthManager
- #current_user ⇒ Object
Instance Method Details
#auth_guard(name = nil) ⇒ MiniAuth::Guard
13 14 15 |
# File 'lib/mini_auth/guarded.rb', line 13 def auth_guard(name = nil) auth_manager.fetch_guard(request, name) end |
#auth_manager ⇒ MiniAuth::AuthManager
8 9 10 |
# File 'lib/mini_auth/guarded.rb', line 8 def auth_manager @auth_manager ||= MiniAuth::AuthManager.instance end |
#current_user ⇒ Object
17 18 19 |
# File 'lib/mini_auth/guarded.rb', line 17 def current_user auth_guard.user end |