strimzi / strimzi-kafka-oauth

OAuth2 support for Apache Kafka® to work with many OAuth2 authorization servers
Apache License 2.0
140 stars 89 forks source link

oath-client handler class refactoring #226

Closed berkde closed 6 months ago

berkde commented 6 months ago

Refactored the code for better understandability, maintainability and testability by separating concerns via delegating some functions to other classes and injecting them in the main handler class.

Simplified the code logic whereas possible without hurting the general structure much.

Note: Would be great if we could utilise Java 17 to start taking advantage of new "switch" for a more data oriented approach instead of if-else.