Class: ClassyCAS::Strategies::Base
- Inherits:
-
Warden::Strategies::Base
- Object
- Warden::Strategies::Base
- ClassyCAS::Strategies::Base
- Defined in:
- lib/strategies/base.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#fail(message = "Failed to Login") ⇒ Object
Casuses the strategy to fail, but not halt.
- #fail!(message = "Failed to Login") ⇒ Object
- #redirect_to_login_with_service_url ⇒ Object
- #valid? ⇒ Boolean
Instance Method Details
#fail(message = "Failed to Login") ⇒ Object
Casuses the strategy to fail, but not halt. The strategies will cascade after this failure and warden will check the next strategy. The last strategy to fail will have it’s message displayed. :api: public
16 17 18 19 |
# File 'lib/strategies/base.rb', line 16 def fail( = "Failed to Login") super redirect_to_login_with_service_url end |
#fail!(message = "Failed to Login") ⇒ Object
9 10 11 12 |
# File 'lib/strategies/base.rb', line 9 def fail!( = "Failed to Login") super redirect_to_login_with_service_url end |
#redirect_to_login_with_service_url ⇒ Object
21 22 23 |
# File 'lib/strategies/base.rb', line 21 def redirect_to_login_with_service_url redirect!("/login", {:service => params["service"]}, :message => "Login was not successful") end |
#valid? ⇒ Boolean
5 6 7 |
# File 'lib/strategies/base.rb', line 5 def valid? params["username"] && params["password"] end |