File: pass_with_message.rb

package info (click to toggle)
ruby-warden 1.2.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 360 kB
  • sloc: ruby: 3,261; makefile: 4
file content (9 lines) | stat: -rw-r--r-- 328 bytes parent folder | download
1
2
3
4
5
6
7
8
9
# encoding: utf-8
# frozen_string_literal: true
Warden::Strategies.add(:pass_with_message) do
  def authenticate!
    request.env['warden.spec.strategies'] ||= []
    request.env['warden.spec.strategies'] << :pass_with_message
    success!("Valid User", "The Success Strategy Has Accepted You") unless scope == :failz
  end
end