-
Notifications
You must be signed in to change notification settings - Fork 42
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
Dynamically Change Credentials #41
Comments
Hello!
By using an interface to supply the credentials you can avoid recreating the whole client, but maybe the cache |
clearing the cache is definitely necessary as pre-existing authentications will probalby no longer work. sorry for not coming back earlier |
I have added a test case for how updating the username/password mid-flight. https://github.com/rburgst/okhttp-digest/blob/master/src/test/java/com/burgstaller/okhttp/basic/BasicAuthenticatorWithMockWebserverTest.java#L111. |
Hello everyone.
I need to change the Credentials on runtime without having to build a new instance of my OkHttpClient.
Is it possible? What would be a good alternative?
I am using Dagger2 to keep singleton instances of my Retrofit and OkHttpClient. It works flawlessly with the credentials of the 'default' user but I need to change them later on to access other methods.
The text was updated successfully, but these errors were encountered: