File: strategies.rb

package info (click to toggle)
ruby-omniauth-multipassword 2.0.0~rc1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 160 kB
  • sloc: ruby: 243; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 538 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# frozen_string_literal: true

module OmniAuth
  module Strategies
    class OneTest
      include OmniAuth::Strategy
      include OmniAuth::MultiPassword::Base

      def authenticate(username, password)
        username == 'john' && password == 'secret'
      end
    end
  end
end

module OmniAuth
  module Strategies
    class TwoTest
      include OmniAuth::Strategy
      include OmniAuth::MultiPassword::Base

      def authenticate(username, password)
        username == 'jane' && password == '1234'
      end
    end
  end
end