/usr/lib/python2.7/dist-packages/notebook/auth/logout.py is in python-notebook 5.2.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | """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)]
|