Example #1
0
    def get(self):
        """
        :return:
        """

        try:
            yield logout(self)
            self.clear_cookie(settings.XSRF_TOKEN)
            self.response.respond({"message": "Logout Successful"})
        except AuthenticationError as e:
            msg = "Logout Failed. {0}".format(str(e))
            self.logger.error(msg)
            self.send_error(status_code=400, reason=msg)
Example #2
0
 def logout(self):
   auth.logout()