Sha256: d8302b3332a76bd7026636de11b5257a7b408fef2bde084b3864e6c0bf1a8ef2
Contents?: true
Size: 427 Bytes
Versions: 3
Compression:
Stored size: 427 Bytes
Contents
module ClassyCAS module Strategies class Simple < Base User = Struct.new(:username, :password) def authenticate! if params["username"] == "test" && params["password"] == "password" u = User.new(params["username"], params["password"]) success!(u) else fail! end end end end end Warden::Strategies.add(:simple, ClassyCAS::Strategies::Simple)
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
classy_cas-0.9.3 | lib/strategies/simple.rb |
classy_cas-0.9.2 | lib/strategies/simple.rb |
classy_cas-0.9.1 | lib/strategies/simple.rb |