def call(env)
      request = Rack::Request.new(env)

      if @options[:bypass] && @options[:bypass].call(request)
        env["oauth.authenticated"] = false
        @app.call(env)
      else
        oauth_signed_request_class = OAuthenticator::SignedRequest.including_config(@options[:config_methods])
        oauth_request = oauth_signed_request_class.from_rack_request(request)
        if oauth_request.errors
          log_unauthenticated(env, oauth_request)
          unauthenticated_response(oauth_request.errors)
        else
          log_success(env, oauth_request)
          env["oauth.signed_request"] = oauth_request
          env["oauth.consumer_key"] = oauth_request.consumer_key
          env["oauth.token"] = oauth_request.token
          env["oauth.authenticated"] = true
          @app.call(env)
        end
      end
    end
def call(env)
      request = Rack::Request.new(env)

      if @options[:bypass] && @options[:bypass].call(request)
        env["oauth.authenticated"] = false
        @app.call(env)
      else
        oauth_signed_request_class = OAuthenticator::SignedRequest.including_config(@options[:config_methods])
        oauth_request = oauth_signed_request_class.from_rack_request(request)
        if oauth_request.errors
          log_unauthenticated(env, oauth_request)
          unauthenticated_response(oauth_request.errors)
        else
          log_success(env, oauth_request)
          env["oauth.signed_request"] = oauth_request
          env["oauth.consumer_key"] = oauth_request.consumer_key
          env["oauth.token"] = oauth_request.token
          env["oauth.authenticated"] = true
          @app.call(env)
        end
      end
    end
options:

 - `:bypass` - a proc which will be called with a Rack::Request, which must have a boolean result.
   if the result is true, authentication checking is bypassed. if false, the request is authenticated
   and responds 401 if not authenticated.

 - `:config_methods` - a Module which defines necessary methods for an {OAuthenticator::SignedRequest} to
   determine if it is validly signed. See documentation for {OAuthenticator::ConfigMethods}
   for details of what this module must implement.

 - `:logger` - a Logger instance to which OAuthenticator::RackAuthenticator will log informative messages

 - `:realm` - 401 responses include a `WWW-Authenticate` with the realm set to the given value. default
   is an empty string.
 call the middleware!