htcondor / scitokens-credmon

HTCondor implementation of the Scitokens credential monitor
Apache License 2.0
3 stars 7 forks source link

Problem when returning from OAuth provider when using custom-named providers #5

Closed jasoncpatton closed 5 years ago

jasoncpatton commented 5 years ago

For example, say a user wants multiple Box tokens, and so requests tokens named box_1 and box_2. When the OAuthCredmonWebserver sends the user out to Box's authorize endpoint, they will get sent back to something like "/return/box", not "/return/box_1". Thus, methods that lookup the provider info in the key file or session object will fail because they will be looking for a provider named "box", per the return decorator's argument /return/<provider>. We should tag the session variable with the outgoing custom token name so that it can be looked up upon return from the OAuth authorize endpoint.