code: def verify(self, request, **kwargs):
          
  
          #logger.debug("verify(%s)" % request)
          if isinstance(request, six.string_types):
              _dict = parse_qs(request)
          elif isinstance(request, dict):
              _dict = request
          else:
              raise ValueError("Wrong type of input")
  
          # verify username and password
          try:
              self._verify(_dict["password"][0], _dict["login"][0])
              timestamp = str(int(time.mktime(time.gmtime())))
              msg = "::".join([_dict["login"][0], timestamp])
              info = self.symmetric.encrypt(msg.encode())
              self.active[info] = timestamp
              cookie = make_cookie(self.cookie_name, info, self.srv.seed)
              return_to = create_return_url(self.return_to, _dict["query"][0],
                                            **{self.query_param: "true"})
              resp = Redirect(return_to, headers=[cookie])
          except (ValueError, KeyError):
              resp = Unauthorized("Unknown user or wrong password")
  
          return resp
docs: Verifies that the given username and password was correct
          :param request: Either the query part of a URL a urlencoded
              body of a HTTP message or a parse such.
          :param kwargs: Catch whatever else is sent.
          :return: redirect back to where ever the base applications
              wants the user after authentication.