Skip to content

Commit

Permalink
debug token exchange 5
Browse files Browse the repository at this point in the history
  • Loading branch information
garciagenrique committed Nov 12, 2024
1 parent 7ba3c1a commit 54b6921
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions infrastructure/cluster/flux/jhub/jhub-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ spec:
'audience': 'rucio'
}
response = requests.post(self.token_url, data=params)
print("EXCHANGE TOKEN")
print(response.json())
rucio_token = response.json()['access_token']
return rucio_token
async def pre_spawn_start(self, user, spawner):
Expand All @@ -108,6 +110,8 @@ spec:
# define token environment variable from auth_state
spawner.environment['RUCIO_ACCESS_TOKEN'] = auth_state['access_token'] #self.exchange_token(auth_state['access_token'])
spawner.environment['EOS_ACCESS_TOKEN'] = auth_state['access_token']
spawner.environment.update({'RUCIO_ACCESS_TOKEN': self.exchange_token(auth_state['access_token'])})
# set the above authenticator as the default
c.JupyterHub.authenticator_class = RucioAuthenticator
Expand Down

0 comments on commit 54b6921

Please sign in to comment.