Sha256: d00edd1a3b31e5eeb9cb66f83cc65b7c305e57868c1ce1045a58470cccded51b

Contents?: true

Size: 406 Bytes

Versions: 1

Compression:

Stored size: 406 Bytes

Contents

module Rlyeh
  module DeepOnes
    module Auth
      class Basic < Rlyeh::DeepOnes::Auth::Base
        def initialize(app, nick, pass)
          @basic = [nick, pass].freeze
          super app
        end

        def try(env)
          if @basic == [nick, pass]
            succeeded env
            welcome env
          else
            failed env
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rlyeh-0.1.1 lib/rlyeh/deep_ones/auth/basic.rb