Add refresh user function
This commit is contained in:
parent
711c3b516b
commit
fbc276d175
|
@ -26,6 +26,14 @@ hub:
|
||||||
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']
|
||||||
spawner.environment['NEXTCLOUD_ACCESS_TOKEN'] = access_token
|
spawner.environment['NEXTCLOUD_ACCESS_TOKEN'] = access_token
|
||||||
|
|
||||||
|
async def refresh_user(self, user, handler=None):
|
||||||
|
access_token = self.user_dict[user.name]['access_token']
|
||||||
|
refresh_token = self.user_dict[user.name]['refresh_token']
|
||||||
|
token_response = self.user_dict[user.name]['token_response']
|
||||||
|
print(token_response)
|
||||||
|
return True
|
||||||
|
|
||||||
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']
|
||||||
c.NextcloudOAuthenticator.client_secret = os.environ['NEXTCLOUD_CLIENT_SECRET']
|
c.NextcloudOAuthenticator.client_secret = os.environ['NEXTCLOUD_CLIENT_SECRET']
|
||||||
|
|
Loading…
Reference in a new issue