Show More
@@ -83,7 +83,7 b' from IPython.utils.importstring import import_item' | |||||
83 | from IPython.utils.localinterfaces import LOCALHOST |
|
83 | from IPython.utils.localinterfaces import LOCALHOST | |
84 | from IPython.utils import submodule |
|
84 | from IPython.utils import submodule | |
85 | from IPython.utils.traitlets import ( |
|
85 | from IPython.utils.traitlets import ( | |
86 | Dict, Unicode, Integer, List, Bool, |
|
86 | Dict, Unicode, Integer, List, Bool, Bytes, | |
87 | DottedObjectName |
|
87 | DottedObjectName | |
88 | ) |
|
88 | ) | |
89 | from IPython.utils import py3compat |
|
89 | from IPython.utils import py3compat | |
@@ -164,7 +164,7 b' class NotebookWebApplication(web.Application):' | |||||
164 | static_url_prefix = url_path_join(base_project_url,'/static/'), |
|
164 | static_url_prefix = url_path_join(base_project_url,'/static/'), | |
165 |
|
165 | |||
166 | # authentication |
|
166 | # authentication | |
167 |
cookie_secret= |
|
167 | cookie_secret=ipython_app.cookie_secret, | |
168 | login_url=url_path_join(base_project_url,'/login'), |
|
168 | login_url=url_path_join(base_project_url,'/login'), | |
169 | read_only=ipython_app.read_only, |
|
169 | read_only=ipython_app.read_only, | |
170 | password=ipython_app.password, |
|
170 | password=ipython_app.password, | |
@@ -338,6 +338,15 b' class NotebookApp(BaseIPythonApplication):' | |||||
338 | keyfile = Unicode(u'', config=True, |
|
338 | keyfile = Unicode(u'', config=True, | |
339 | help="""The full path to a private key file for usage with SSL/TLS.""" |
|
339 | help="""The full path to a private key file for usage with SSL/TLS.""" | |
340 | ) |
|
340 | ) | |
|
341 | ||||
|
342 | cookie_secret = Bytes(b'', config=True, | |||
|
343 | help="""The random bytes used to secure cookies. | |||
|
344 | By default this is a new random number every time you start the Notebook. | |||
|
345 | Set it to a value in a config file to enable logins to persist across server sessions. | |||
|
346 | """ | |||
|
347 | ) | |||
|
348 | def _cookie_secret_default(self): | |||
|
349 | return os.urandom(1024) | |||
341 |
|
350 | |||
342 | password = Unicode(u'', config=True, |
|
351 | password = Unicode(u'', config=True, | |
343 | help="""Hashed password to use for web authentication. |
|
352 | help="""Hashed password to use for web authentication. |
General Comments 0
You need to be logged in to leave comments.
Login now