Format
This commit is contained in:
parent
a16ec5a227
commit
711c3b516b
|
@ -21,10 +21,10 @@ hub:
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
self.user_dict = {}
|
self.user_dict = {}
|
||||||
|
|
||||||
def pre_spawn_start(self, user, spawner):
|
def pre_spawn_start(self, user, spawner):
|
||||||
super().pre_spawn_start(user, spawner)
|
super().pre_spawn_start(user, spawner)
|
||||||
access_token = self.user_dict[user.name]['access_token']
|
access_token = self.user_dict[user.name]['access_token']
|
||||||
# refresh_token = self.user_dict[user.name]['refresh_token']
|
|
||||||
spawner.environment['NEXTCLOUD_ACCESS_TOKEN'] = access_token
|
spawner.environment['NEXTCLOUD_ACCESS_TOKEN'] = access_token
|
||||||
c.JupyterHub.authenticator_class = NextcloudOAuthenticator
|
c.JupyterHub.authenticator_class = NextcloudOAuthenticator
|
||||||
c.NextcloudOAuthenticator.client_id = os.environ['NEXTCLOUD_CLIENT_ID']
|
c.NextcloudOAuthenticator.client_id = os.environ['NEXTCLOUD_CLIENT_ID']
|
||||||
|
|
Loading…
Reference in a new issue