-
Notifications
You must be signed in to change notification settings - Fork 74
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
Add support for open id connect token auth #36
Conversation
63245e9
to
ffc31d5
Compare
Codecov Report
@@ Coverage Diff @@
## master #36 +/- ##
==========================================
+ Coverage 93.51% 94.07% +0.55%
==========================================
Files 16 18 +2
Lines 1003 1181 +178
==========================================
+ Hits 938 1111 +173
- Misses 65 70 +5
Continue to review full report at Codecov.
|
1718314
to
a4b7a8a
Compare
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.
Please try to use asynchronous calls to manage OAuth sessions. Thanks.
self._perform_oauth_refresh(provider, client, well_known_data) | ||
|
||
def _perform_oauth_refresh(self, provider, client, well_known_data): | ||
# It's not optimal that this isn't async, but there's no existing well-supported |
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.
Yes, and it was a reason why I didn't copy this from the official library. The main goal of this library is to use only asynchronous calls.
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.
👍🏼 Fair enough. I'll write the subset we need off of aio
cea5c1a
to
5267788
Compare
5267788
to
6ced258
Compare
@tomplus There's a functional asyncio version for ya ❤️ |
05bc021
to
3947abf
Compare
3947abf
to
59967f7
Compare
@tomplus this should be ready for re-review when you have a chance |
@bpicolo Thanks a lot! I'll check how it works soon... |
LGTM Great job! Thanks for your contribution. |
Fixes #35.
The one think I wasn't yet able check the actual functionality of is
idp-certificate-authority-data
, but my org will add that sometime soon and then I can give that a shot to see if it works as intended in practice. (It essentially matches what kubectl tries at the moment, though)Lmk what other tests you'd like to see here. It's based off the kubernetes/python-base version, but I cleaned up a bunch of the code and also fixed a number of bugs. I'm able to successfully auth / run commands against the kubernetes cluster in question with this patch.
Thanks!