Class: MiniAuth::TestGuard
Instance Method Summary collapse
- #attempt!(credentials, remember = nil) ⇒ Object
- #auth_url ⇒ Object
- #login!(user, remember = nil) ⇒ Object
- #logout! ⇒ Object
- #user ⇒ Object
Methods inherited from Guard
Instance Method Details
#attempt!(credentials, remember = nil) ⇒ Object
4 5 6 |
# File 'lib/mini_auth/test_guard.rb', line 4 def attempt!(credentials, remember = nil) raise NotImplementedError, 'Testing guard does not support login attempts.' end |
#auth_url ⇒ Object
20 21 22 |
# File 'lib/mini_auth/test_guard.rb', line 20 def auth_url '/login' end |
#login!(user, remember = nil) ⇒ Object
8 9 10 |
# File 'lib/mini_auth/test_guard.rb', line 8 def login!(user, remember = nil) @user = user end |
#logout! ⇒ Object
12 13 14 |
# File 'lib/mini_auth/test_guard.rb', line 12 def logout! @user = nil end |
#user ⇒ Object
16 17 18 |
# File 'lib/mini_auth/test_guard.rb', line 16 def user @user ||= nil end |