Make DefaultHttpClient extensible
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 1/5
- Temps estimé
- Moins d'une heure
- Accessibilité débutants
- 50/100
Piste de recherche
Commencez par le constructeur de DefaultHttpClient(OkHttpClient) et examinez le contrat de Auth0HttpClient pour comprendre comment l’implémentation existante est exposée. C’est terminé lorsqu’une sous-classe peut réutiliser le constructeur avec un OkHttpClient sans devoir implémenter l’intégralité du contrat ; vérifiez la modification avec les tests existants du dépôt.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Checklist
- I have looked into the Readme and Examples, 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
We use OkHttp as our client across our codebase and share common default configuration. We would like to re-use this configuration in our use of the Auth0 client without having to implement the whole Auth0HttpClient contract.
Describe the ideal solution
Make the following constructor protected instead of package scoped.
DefaultHttpClient(OkHttpClient client) {
this.client = client;
}
Alternatives and current workarounds
For us to solve this, the only alternative we can see is to fully implement the Auth0HttpClient contract. This would basically be copy-pasting from the DefaultHttpClient implementation in the SDK.
An alternative to the attached PR solution would be to build out DefaultHttpClient.Builder with more-and-more of the configurations that the OkHttp library supports (dispatcher executor service, etc) to cover our use case. This seems unattractive as if you follow that approach fully you end up with a copy of what the OkHttp client builder exposes.
Additional context
No response
- Langage dominant
- Java
- Étoiles
- 319
- Forks
- 155
- Merge moyen
- 1 j 1 h
- PR mergées (30 j)
- 12
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de auth0/auth0-java
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
auth0/auth0-java#887 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
auth0/auth0-java#842 · 2 commentaires ·
-
bug
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
auth0/auth0-java#911 ·
-
bug
Difficulté 3/5 1-2 jours Accessibilité débutants 25/100
auth0/auth0-java#897 ·
Toutes les issues de auth0/auth0-java
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
infinispan/infinispan#18150 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
-
untriaged
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100