[ https://issues.apache.org/jira/browse/SLING-12714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17955885#comment-17955885 ]
Robert Munteanu commented on SLING-12714: ----------------------------------------- Hi [~nscendoni] Happy to see the second PR merged and thanks for the patience! I too a quick look in the testing area and I think there is some code we can get rid of. I see classes like - https://github.com/apache/sling-org-apache-sling-auth-oauth-client/blob/master/src/test/java/org/apache/sling/auth/oauth_client/impl/MockRequest.java - https://github.com/apache/sling-org-apache-sling-auth-oauth-client/blob/master/src/test/java/org/apache/sling/auth/oauth_client/impl/MockResponse.java and mocking of core Sling/OSGi functionality - https://github.com/apache/sling-org-apache-sling-auth-oauth-client/blob/3b0ebb96857a13c068c896e1ca9a033aaa9c01f1/src/test/java/org/apache/sling/auth/oauth_client/impl/OidcAuthenticationHandlerTest.java#L93-L94 These are very well covered by the Sling mocks ( https://sling.apache.org/documentation/development/sling-mock.html ) and we should aim to use that instead. I also see at least one JUnit 4 test, it would be great to convert it to JUnit 5, like the rest of the module uses - https://github.com/apache/sling-org-apache-sling-auth-oauth-client/blob/3b0ebb96857a13c068c896e1ca9a033aaa9c01f1/src/test/java/org/apache/sling/auth/oauth_client/impl/TokenStoreTest.java > Oidc Authentication Handler > --------------------------- > > Key: SLING-12714 > URL: https://issues.apache.org/jira/browse/SLING-12714 > Project: Sling > Issue Type: Improvement > Components: Extensions > Reporter: Nicola Scendoni > Assignee: Nicola Scendoni > Priority: Minor > Fix For: OAuth Client 0.1.2 > > > {*}Description:{*}{*}{*} > Apache Sling currently provides an *OAuth 2 client*, but it is *not an > authentication handler*. This means that while applications can use OAuth 2 > for authorization, there is no built-in mechanism to handle user > authentication via OpenID Connect (OIDC). Given the widespread adoption of > OIDC for authentication, adding support for an *OIDC Authentication Handler* > would greatly enhance Sling’s authentication capabilities. > > {*}Feature Request:{*}{*}{*} > Develop a pluggable *OIDC Authentication Handler* that enables authentication > via OpenID Connect providers (e.g., Google, Azure AD, Keycloak, Okta). > -- This message was sent by Atlassian Jira (v8.20.10#820010)