Class: ClassyCAS::Strategies::Base

Inherits:
Warden::Strategies::Base
  • Object
show all
Defined in:
lib/strategies/base.rb

Direct Known Subclasses

DeviseDatabase, Simple

Instance Method Summary collapse

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(message = "Failed to Login")
  super
  
end

#fail!(message = "Failed to Login") ⇒ Object



9
10
11
12
# File 'lib/strategies/base.rb', line 9

def fail!(message = "Failed to Login")
  super
  
end

#redirect_to_login_with_service_urlObject



21
22
23
# File 'lib/strategies/base.rb', line 21

def 
  redirect!("/login", {:service => params["service"]}, :message => "Login was not successful")
end

#valid?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/strategies/base.rb', line 5

def valid?
  params["username"] && params["password"]
end