Make DefaultHttpClient extensible
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 50/100
Línea de trabajo
Comienza por el constructor DefaultHttpClient(OkHttpClient) y revisa el contrato Auth0HttpClient para entender cómo se expone la implementación existente. Se considera terminado cuando una subclase puede reutilizar el constructor con un OkHttpClient sin implementar el contrato completo; verifica el cambio con las pruebas existentes del repositorio.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Java
- Estrellas
- 319
- Forks
- 155
- Merge medio
- 1 d 1 h
- PR fusionados (30 d)
- 12
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de auth0/auth0-java
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
auth0/auth0-java#887 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
auth0/auth0-java#842 · 2 comentarios ·
-
bug
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
auth0/auth0-java#911 ·
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
auth0/auth0-java#897 ·
Todos los issues de auth0/auth0-java
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
infinispan/infinispan#18150 ·
-
area/frontend
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
opensearch-project/k-NN#3597 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100