Skip to content

Add ability to configure callTimeoutMillis, readTimeoutMillis and writeTimeoutMillis in OkHttpClient used by DefaultClient #787

Open
@Dmitry-Komarovsky

Description

@Dmitry-Komarovsky

Checklist

  • I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestA feature has been asked for or suggested by the community

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions