Sha256: b4adb8a8085b638a590e6da540fd1a6e628aa30f665280840c12110866b5f653
Contents?: true
Size: 402 Bytes
Versions: 26
Compression:
Stored size: 402 Bytes
Contents
Warden::Strategies.add(:password) do def authenticate! request.env['warden.spec.strategies'] ||= [] request.env['warden.spec.strategies'] << :password if params["password"] || params["username"] params["password"] == "sekrit" && params["username"] == "fred" ? success!("Authenticated User") : fail!("Username or password is incorrect") else pass end end end
Version data entries
26 entries across 26 versions & 2 rubygems