-
Notifications
You must be signed in to change notification settings - Fork 17
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
PR-3242 Improve handling of JWT bearer tokens #853
Conversation
f12c953
to
a1023e9
Compare
except EulaException as e: | ||
log.warning("user has not accepted EULA") | ||
status_code = 403 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be useful or possible to use http status forbidden from https://docs.python.org/3/library/http.html#http-status-codes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be possible, I'm not sure it would be super useful. It would be nice to have the text names of the status codes, but then you'd lose the integer code information which is ultimately what matters.
Besides the debate over whether or not it should be changed, procedurally I would want to make a change like that in it's own PR since it would have to touch code all over TEA.
a1023e9
to
839daec
Compare
839daec
to
7cd5ebb
Compare
7cd5ebb
to
c9ecccb
Compare
c9ecccb
to
d9e2af9
Compare
Replaces the old bearer token logic with updated handling for JWT bearer tokens. The user_id is extracted from the bearer token directly, eliminating 1 call to EDL, and then the token is used to fetch the user profile, simultaneously verifying the validity of the token and returning the profile information. That eliminates another EDL call for fetching an application bearer token.
TODO: