You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ORPA-pyOpenRPA/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/notebook/auth/logout.py

23 lines
662 B

"""Tornado handlers for logging out of the notebook.
"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from ..base.handlers import IPythonHandler
class LogoutHandler(IPythonHandler):
def get(self):
self.clear_login_cookie()
if self.login_available:
message = {'info': 'Successfully logged out.'}
else:
message = {'warning': 'Cannot log out. Notebook authentication '
'is disabled.'}
self.write(self.render_template('logout.html',
message=message))
default_handlers = [(r"/logout", LogoutHandler)]