Skip to content
This repository was archived by the owner on Mar 17, 2023. It is now read-only.

Commit d5cb75a

Browse files
vpavlinChad Roberts
authored andcommitted
Add JUPYTERHUB_LOGIN_URL to JSP service
1 parent 4f844d3 commit d5cb75a

3 files changed

Lines changed: 62 additions & 58 deletions

File tree

.jupyter/jupyterhub_config.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
public_service_dict.update(os.environ)
2323
jsp_api_dict = {
2424
'KUBERNETES_SERVICE_HOST': os.environ['KUBERNETES_SERVICE_HOST'],
25-
'KUBERNETES_SERVICE_PORT': os.environ['KUBERNETES_SERVICE_PORT']
25+
'KUBERNETES_SERVICE_PORT': os.environ['KUBERNETES_SERVICE_PORT'],
26+
'JUPYTERHUB_LOGIN_URL': None
2627
}
2728
c.JupyterHub.services = [
2829
{
@@ -106,6 +107,8 @@
106107
c.JupyterHub.authenticator_class = OpenShiftOAuthenticator
107108
c.Authenticator.auto_login = True
108109
c.Authenticator.enable_auth_state = True
110+
c.OpenShiftOAuthenticator.auth_refresh_age = 300
111+
c.OpenShiftOAuthenticator.refresh_pre_spawn = True
109112

110113
# Override scope as oauthenticator code doesn't set it correctly.
111114
# Need to lodge a PR against oauthenticator to have this fixed.
@@ -169,6 +172,7 @@
169172
raise RuntimeError('Cannot calculate external host name for JupyterHub.')
170173

171174
c.OpenShiftOAuthenticator.oauth_callback_url = 'https://%s/hub/oauth_callback' % host
175+
jsp_api_dict['JUPYTERHUB_LOGIN_URL'] = 'https://%s/hub/login' % host
172176

173177
from html.parser import HTMLParser
174178

Pipfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ verify_ssl = true
77

88
[packages]
99
openshift = "==0.11.2"
10-
jupyterhub-singleuser-profiles = "==0.4.1"
10+
jupyterhub-singleuser-profiles = "==0.4.2"
1111
publish-service = {ref = "7cbf34e494fd9a0a79e9cd9a8c1d48a6775b9f49",git = "https://github.com/vpavlin/jupyter-publish-extension.git", editable = true}
12-
oauthenticator = {ref = "2bf137c35e4eddac0a586ac054098ff74c30c779",git = "https://github.com/opendatahub-io/oauthenticator.git", editable = true}
12+
oauthenticator = {ref = "d98936da37569b7bb400c6854b07041dce3e7f87",git = "https://github.com/opendatahub-io/oauthenticator.git", editable = true}
1313

1414
[requires]
1515
python_version = "3.6"

Pipfile.lock

Lines changed: 55 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)