File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -27,12 +27,15 @@ The easiest way to add endpoints and handle incoming requests is to subclass the
27
27
.. code-block :: python
28
28
29
29
from jupyter_server.base.handlers import JupyterHandler
30
+ import tornado
30
31
31
32
class MyExtensionHandler (JupyterHandler ):
32
33
34
+ @tornado.web.authenticated
33
35
def get (self ):
34
36
...
35
37
38
+ @tornado.web.authenticated
36
39
def post (self ):
37
40
...
38
41
@@ -178,13 +181,16 @@ Jupyter Server provides a convenient mixin class for adding these properties to
178
181
179
182
from jupyter_server.base.handlers import JupyterHandler
180
183
from jupyter_server.extension.handler import ExtensionHandlerMixin
184
+ import tornado
181
185
182
186
183
187
class MyExtensionHandler (ExtensionHandlerMixin , JupyterHandler ):
184
188
189
+ @tornado.web.authenticated
185
190
def get (self ):
186
191
...
187
192
193
+ @tornado.web.authenticated
188
194
def post (self ):
189
195
...
190
196
@@ -217,16 +223,19 @@ Pair the example above with ``ExtensionHandlers`` that also inherit the ``Extens
217
223
ExtensionHandlerMixin,
218
224
ExtensionHandlerJinjaMixin
219
225
)
226
+ import tornado
220
227
221
228
class MyExtensionHandler (
222
229
ExtensionHandlerMixin ,
223
230
ExtensionHandlerJinjaMixin ,
224
231
JupyterHandler
225
232
):
226
233
234
+ @tornado.web.authenticated
227
235
def get (self ):
228
236
...
229
237
238
+ @tornado.web.authenticated
230
239
def post (self ):
231
240
...
232
241
You can’t perform that action at this time.
0 commit comments