Sha256: 4f36e2fcfa09a2359e7fc35b7f09025e3ecc0b58005dee1e62a1867fc18fd55c

Contents?: true

Size: 468 Bytes

Versions: 8

Compression:

Stored size: 468 Bytes

Contents

module Rack
  module OAuth2
    module Server
      module Abstract
        class Handler
          attr_accessor :realm, :authenticator, :request, :response

          def initialize(realm = nil, &authenticator)
            @realm = realm
            @authenticator = authenticator
          end

          def call(env)
            @authenticator.call(@request, @response) if @authenticator
            @response
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rack-oauth2-0.2.2.1 lib/rack/oauth2/server/abstract/handler.rb
rack-oauth2-0.2.3 lib/rack/oauth2/server/abstract/handler.rb
rack-oauth2-0.2.2 lib/rack/oauth2/server/abstract/handler.rb
rack-oauth2-0.2.1 lib/rack/oauth2/server/abstract/handler.rb
rack-oauth2-0.2.0 lib/rack/oauth2/server/abstract/handler.rb
rack-oauth2-0.1.0 lib/rack/oauth2/server/abstract/handler.rb
rack-oauth2-0.0.9 lib/rack/oauth2/server/abstract/handler.rb
rack-oauth2-0.0.8 lib/rack/oauth2/server/abstract/handler.rb