A class developed out of the request to use OpenID as an authentication middleware. The request will be sent to the OpenID instance unless the block evaluates to true. For example in rackup, you can use it as such: use Rack::Session::Pool use Rack::Auth::OpenIDAuth, realm, openid_options do |env| env['rack.session'][:authkey] == a_string end run RackApp Or simply: app = Rack::Auth::OpenIDAuth.new