Closed dominik003 closed 3 weeks ago
Fixes the identification parts of https://github.com/DSD-DBS/capella-collab-manager/issues/1645
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
This PR refactors the OIDC configuration and flow by introducing proper interfaces and classes instead of using simple functions. This approach follows the Dependency Inversion Principle, which seems appropriate here. In addition to the general points mentioned there, this approach makes it really easy to create mock OIDC configuration and flow classes that can be used in tests, and allows us or a third party to easily integrate additional implementations as needed. For example, if a user has a requirement to use the asymmetric variant of OAuth/OIDC instead of a client id and client secret, an additional provider can be integrated. Another example would be the case where an OIDC provider does not support the wellk-known endpoint, or a company requires this to be set statically in the configuration. In both cases, we would only need to add another concrete implementation, and only the injection mechanism would need to be adjusted.
However, removing the abstraction is also easy and fast to do, and I can also see the point of not introducing it. Let's quickly discuss it next Monday, @MoritzWeber0 but other than that and the open TODOs below this PR can be reviewed.