##// END OF EJS Templates
MAINT: Use `Type` instead of `DottedObjectName` Log{in,out}Handler.
Scott Sanderson -
Show More
@@ -67,6 +67,8 b' from .services.clusters.clustermanager import ClusterManager'
67 from .services.sessions.sessionmanager import SessionManager
67 from .services.sessions.sessionmanager import SessionManager
68
68
69 from .base.handlers import AuthenticatedFileHandler, FileFindHandler
69 from .base.handlers import AuthenticatedFileHandler, FileFindHandler
70 from .auth.login import LoginHandler
71 from .auth.logout import LogoutHandler
70
72
71 from IPython.config import Config
73 from IPython.config import Config
72 from IPython.config.application import catch_config_error, boolean_flag
74 from IPython.config.application import catch_config_error, boolean_flag
@@ -83,7 +85,7 b' from IPython.utils import submodule'
83 from IPython.utils.process import check_pid
85 from IPython.utils.process import check_pid
84 from IPython.utils.traitlets import (
86 from IPython.utils.traitlets import (
85 Dict, Unicode, Integer, List, Bool, Bytes, Instance,
87 Dict, Unicode, Integer, List, Bool, Bytes, Instance,
86 DottedObjectName, TraitError, Type,
88 TraitError, Type,
87 )
89 )
88 from IPython.utils import py3compat
90 from IPython.utils import py3compat
89 from IPython.utils.path import filefind, get_ipython_dir
91 from IPython.utils.path import filefind, get_ipython_dir
@@ -660,13 +662,17 b' class NotebookApp(BaseIPythonApplication):'
660 """
662 """
661 )
663 )
662
664
663 login_handler = DottedObjectName('IPython.html.auth.login.LoginHandler',
665 login_handler = Type(
666 default_value=LoginHandler,
664 config=True,
667 config=True,
665 help='The login handler class to use.')
668 help='The login handler class to use.',
669 )
666
670
667 logout_handler = DottedObjectName('IPython.html.auth.logout.LogoutHandler',
671 logout_handler = Type(
672 default_value=LogoutHandler,
668 config=True,
673 config=True,
669 help='The logout handler class to use.')
674 help='The logout handler class to use.',
675 )
670
676
671 trust_xheaders = Bool(False, config=True,
677 trust_xheaders = Bool(False, config=True,
672 help=("Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded-For headers"
678 help=("Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded-For headers"
@@ -777,8 +783,10 b' class NotebookApp(BaseIPythonApplication):'
777 parent=self,
783 parent=self,
778 log=self.log,
784 log=self.log,
779 )
785 )
780 self.login_handler_class = import_item(self.login_handler)
786
781 self.logout_handler_class = import_item(self.logout_handler)
787 # Maintaining this naming convention for backwards compatibility.
788 self.login_handler_class = self.login_handler
789 self.logout_handler_class = self.logout_handler
782
790
783 self.config_manager = self.config_manager_class(
791 self.config_manager = self.config_manager_class(
784 parent=self,
792 parent=self,
General Comments 0
You need to be logged in to leave comments. Login now