Add start of service

This commit is contained in:
Micke Nordin 2024-01-15 15:03:35 +01:00
parent 6c28bffa49
commit 989682d690
Signed by untrusted user: Micke
GPG key ID: F53C4CC83EDAB3BE

View file

@ -107,9 +107,26 @@ hub:
c.NextcloudOAuthenticator.allow_all = True c.NextcloudOAuthenticator.allow_all = True
c.NextcloudOAuthenticator.refresh_pre_spawn = True c.NextcloudOAuthenticator.refresh_pre_spawn = True
c.NextcloudOAuthenticator.enable_auth_state = True c.NextcloudOAuthenticator.enable_auth_state = True
c.NextcloudOAuthenticator.auth_refresh_age = 60 c.NextcloudOAuthenticator.auth_refresh_age = 3600
c.NextcloudOAuthenticator.post_auth_hook = post_auth_hook c.NextcloudOAuthenticator.post_auth_hook = post_auth_hook
serviceCode: |
from jupyter_server.base.handlers import JupyterHandler
import tornado
class MyExtensionHandler(JupyterHandler):
@tornado.web.authenticated
def get(self):
print("Hello World")
def _load_jupyter_server_extension(serverapp: jupyter_server.serverapp.ServerApp):
"""
This function is called when the extension is loaded.
"""
handlers = [("/nextcloud/token", NextcloudExtensionHandler)]
serverapp.web_app.add_handlers(".*$", handlers)
extraEnv: extraEnv:
NEXTCLOUD_DEBUG_OAUTH: "yes" NEXTCLOUD_DEBUG_OAUTH: "yes"
NEXTCLOUD_HOST: sunet.drive.test.sunet.se NEXTCLOUD_HOST: sunet.drive.test.sunet.se