call (Rack::Auth::OpenID)

    # File lib/rack/auth/openid.rb, line 199
          def call(env)
            env['rack.auth.openid'] = self
            session = env[@options[:session_key]]
            unless session and session.is_a? Hash
              raise(NoSession, 'No compatible session')
            end
            # let us work in our own namespace...
            session = (session[:openid] ||= {})
            unless session and session.is_a? Hash
              raise(NoSession, 'Incompatible session')
            end

            request = Rack::Request.new env
            consumer = ::OpenID::Consumer.new session, @options[:store]

            if request.params['openid.mode']
              finish consumer, session, request
            elsif request.params[@options[:openid_param]]
              check consumer, session, request
            else
              env['rack.errors'].puts "No valid params provided."
              bad_request
            end
          rescue NoSession
            env['rack.errors'].puts($!.message, *$@)

            @options. ### Missing or incompatible session
              fetch :no_session, [ 500,
                {'Content-Type'=>'text/plain'},
                $!.message ]
          rescue
            env['rack.errors'].puts($!.message, *$@)

            if not @options[:catch_error]
              raise($!)
            end
            @options.
              fetch :error, [ 500,
                {'Content-Type'=>'text/plain'},
                'OpenID has encountered an error.' ]
          end