Add ability to configure callTimeoutMillis, readTimeoutMillis and writeTimeoutMillis in OkHttpClient used by DefaultClient #787
Labels
feature request
A feature has been asked for or suggested by the community
Checklist
Describe the problem you'd like to have solved
When using CredentialsManager.getCredentials() method there is no direct way to set a custom value for callTimeoutMillis, readTimeoutMillis and writeTimeoutMillis in OkHttpClient used by DefaultClient class. DefaultClient class doesn't set any value to callTimeoutMillis therefore it is 0 by default which means unlimited timeout and this leads to the need to limit this timeout on the client side, for example limit the execution time of CredentialsManager.getCredentials() with external means such as CountDownLatch and wrap this code in a try-catch block.
Describe the ideal solution
Add new parameters to the constructor of Auth0 class to set custom values of callTimeoutMillis, readTimeoutMillis and writeTimeoutMillis.
Alternatives and current workarounds
Limit the execution time of CredentialsManager.getCredentials() with external means such as CountDownLatch and wrap this code in a try-catch block.
Additional context
No response
The text was updated successfully, but these errors were encountered: