Sha256: c8f74954411503afb0d873ba93c473db496bfff956b4623218c8f65777e5e44d

Contents?: true

Size: 550 Bytes

Versions: 48

Compression:

Stored size: 550 Bytes

Contents

module Rack
  module Auth
    # Rack::Auth::AbstractHandler implements common authentication functionality.
    #
    # +realm+ should be set for all handlers.

    class AbstractHandler

      attr_accessor :realm

      def initialize(app, &authenticator)
        @app, @authenticator = app, authenticator
      end


      private

      def unauthorized(www_authenticate = challenge)
        return [ 401, { 'WWW-Authenticate' => www_authenticate.to_s }, [] ]
      end

      def bad_request
        [ 400, {}, [] ]
      end

    end
  end
end

Version data entries

48 entries across 48 versions & 12 rubygems

Version Path
relevance-castronaut-0.5.2 vendor/rack/lib/rack/auth/abstract/handler.rb
relevance-castronaut-0.5.3 vendor/rack/lib/rack/auth/abstract/handler.rb
relevance-castronaut-0.5.4 vendor/rack/lib/rack/auth/abstract/handler.rb
relevance-castronaut-0.6.0 vendor/rack/lib/rack/auth/abstract/handler.rb
relevance-castronaut-0.6.1 vendor/rack/lib/rack/auth/abstract/handler.rb
relevance-castronaut-0.7.4 vendor/rack/lib/rack/auth/abstract/handler.rb
relevance-castronaut-0.7.5 vendor/rack/lib/rack/auth/abstract/handler.rb
technomancy-rack-0.3.0 lib/rack/auth/abstract/handler.rb
nbudin-castronaut-0.7.5 vendor/rack/lib/rack/auth/abstract/handler.rb
merb-core-1.1.3 spec10/public/webrat/test_app/gems/gems/rack-0.4.0/lib/rack/auth/abstract/handler.rb
merb-core-1.1.2 spec10/public/webrat/test_app/gems/gems/rack-0.4.0/lib/rack/auth/abstract/handler.rb
merb-core-1.1.1 spec10/public/webrat/test_app/gems/gems/rack-0.4.0/lib/rack/auth/abstract/handler.rb
merb-core-1.1.0 spec10/public/webrat/test_app/gems/gems/rack-0.4.0/lib/rack/auth/abstract/handler.rb
merb-core-1.1.0.rc1 spec10/public/webrat/test_app/gems/gems/rack-0.4.0/lib/rack/auth/abstract/handler.rb
merb-core-1.1.0.pre spec10/public/webrat/test_app/gems/gems/rack-0.4.0/lib/rack/auth/abstract/handler.rb
mack-0.8.2 lib/gems/rack-0.4.0/lib/rack/auth/abstract/handler.rb
mack-0.8.3 lib/gems/rack-0.9.1/lib/rack/auth/abstract/handler.rb
mack-0.8.3.1 lib/gems/rack-0.9.1/lib/rack/auth/abstract/handler.rb
passenger-2.1.2 vendor/rack-0.9.1/lib/rack/auth/abstract/handler.rb
passenger-2.1.3 vendor/rack-0.9.1/lib/rack/auth/abstract/handler.rb