Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gp02 forward #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions dlauthenticator/dlauthenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# GCDLAUTHENTICATOR -- GC JupyterHub authenticator - ISS


__version__ = '0.4.0'
__author__ = 'Mike Fitzpatrick <[email protected]>'
__version__ = '0.4.1'
__author__ = 'Mike Fitzpatrick <[email protected]>'


import os
Expand All @@ -29,24 +29,24 @@

if DEF_SERVICE_ROOT is None:
THIS_HOST = socket.gethostname()
if THIS_HOST[:5] == 'dldev':
DEF_SERVICE_ROOT = "https://dldev.datalab.noirlab.edu"
elif THIS_HOST[:6] == 'dltest':
DEF_SERVICE_ROOT = "https://dltest.datalab.noirlab.edu"
if THIS_HOST[:4] == 'gp02':
DEF_SERVICE_ROOT = f"https://gp02.datalab.noirlab.edu"
else:
DEF_SERVICE_ROOT = "https://datalab.noirlab.edu"
DEF_SERVICE_ROOT = f"https://datalab.noirlab.edu"

# Typically the terraform environment will set the
# JHUB_DN_NAME env variable
JHUB_DNS_NAME = os.environ.get('JHUB_DNS_NAME')
if JHUB_DNS_NAME is None:
if THIS_HOST[:4] == 'gp02':
DL_LOGIN_NEXT_URL = f"https://gp02.datalab.noirlab.edu"
elif JHUB_DNS_NAME is None:
DL_LOGIN_NEXT_URL = f"{DEF_SERVICE_ROOT}/devbooks/"
else:
DL_LOGIN_NEXT_URL = f"https://{JHUB_DNS_NAME}"

DEF_SERVICE_URL = DEF_SERVICE_ROOT + "/auth"


# Make the runtime path to the debug user file accessible only to somebody
# with admin privs on the machine running the authenticator.

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='dlauthenticator',
version='0.4.0',
version='0.4.1',
description='Data Lab Authenticator for JupyterHub',
url='https://github.com/astro-datalab/dlauthenticator',
author='Mike Fitzpatrick',
Expand Down