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
3mix-castronaut-0.5.0.2 vendor/rack/lib/rack/auth/abstract/handler.rb
kastner-rack-0.3.171 lib/rack/auth/abstract/handler.rb
kastner-rack-0.3.186 lib/rack/auth/abstract/handler.rb
masover-castronaut-0.4.4.4 vendor/rack/lib/rack/auth/abstract/handler.rb
masover-castronaut-0.4.4.5 vendor/rack/lib/rack/auth/abstract/handler.rb
masover-castronaut-0.5.0.1 vendor/rack/lib/rack/auth/abstract/handler.rb
p8-castronaut-0.6.1.1 vendor/rack/lib/rack/auth/abstract/handler.rb
relevance-castronaut-0.2.0 vendor/rack/lib/rack/auth/abstract/handler.rb
relevance-castronaut-0.2.5 vendor/rack/lib/rack/auth/abstract/handler.rb
relevance-castronaut-0.3.0 vendor/rack/lib/rack/auth/abstract/handler.rb
relevance-castronaut-0.3.5 vendor/rack/lib/rack/auth/abstract/handler.rb
relevance-castronaut-0.3.6 vendor/rack/lib/rack/auth/abstract/handler.rb
relevance-castronaut-0.4.1 vendor/rack/lib/rack/auth/abstract/handler.rb
relevance-castronaut-0.4.2 vendor/rack/lib/rack/auth/abstract/handler.rb
relevance-castronaut-0.4.3 vendor/rack/lib/rack/auth/abstract/handler.rb
relevance-castronaut-0.4.4 vendor/rack/lib/rack/auth/abstract/handler.rb
relevance-castronaut-0.4.5 vendor/rack/lib/rack/auth/abstract/handler.rb
relevance-castronaut-0.4.6 vendor/rack/lib/rack/auth/abstract/handler.rb
relevance-castronaut-0.5.0 vendor/rack/lib/rack/auth/abstract/handler.rb
relevance-castronaut-0.5.1 vendor/rack/lib/rack/auth/abstract/handler.rb