-
Notifications
You must be signed in to change notification settings - Fork 510
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 ProviderClient.Reauthenticate() function #743
Conversation
Build failed.
|
If a user wants to do their own HTTP requests and reauthenticate in case of 401 responses, they can already use ProviderClient.ReauthFunc(), but that function is not thread-safe. This commit provides a safer alternative by pulling the relevant piece of code out of ProviderClient.Request().
3061858
to
f0a5d28
Compare
Build succeeded.
|
Any opinion? I would like to have this merged soon since I want to rely on this in a library that I'm currently building. |
@jrperritt What do you think about this? |
I can take a look at this tomorrow. At first glance, it looks reasonable to me. |
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.
This looks good to me. @jtopjian what do you think?
If I understand this correctly, and forgive me if I'm being dense, the idea here is to call |
As you said. My usecase is a custom Swift client library: I tried to build it on top of |
OK, thanks. Sorry it took so long for me to get around to this |
If a user wants to do their own HTTP requests and reauthenticate in case of 401 responses, they can already use
ProviderClient.ReauthFunc()
, but that function is not thread-safe. This commit provides a safer alternative by pulling the relevant piece of code out ofProviderClient.Request()
.For #742.