You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2025/06/18 12:07:26 UTC
(sling-org-apache-sling-auth-oauth-client) branch issue/cleanup-callback-servlet-deps created (now 7f4d020)
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a change to branch issue/cleanup-callback-servlet-deps
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-oauth-client.git
at 7f4d020 chore: remove unused OAuthStateManager from the OAuthCallbackServlet
This branch includes the following new commits:
new 7f4d020 chore: remove unused OAuthStateManager from the OAuthCallbackServlet
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(sling-org-apache-sling-auth-oauth-client) 01/01: chore: remove unused OAuthStateManager from the OAuthCallbackServlet
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch issue/cleanup-callback-servlet-deps
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-oauth-client.git
commit 7f4d0205eefee876c1d5565f9b470e5bbeb18f3e
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed Jun 18 14:06:21 2025 +0200
chore: remove unused OAuthStateManager from the OAuthCallbackServlet
---
.../org/apache/sling/auth/oauth_client/impl/OAuthCallbackServlet.java | 3 ---
.../apache/sling/auth/oauth_client/impl/OAuthCallbackServletTest.java | 2 +-
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/sling/auth/oauth_client/impl/OAuthCallbackServlet.java b/src/main/java/org/apache/sling/auth/oauth_client/impl/OAuthCallbackServlet.java
index 6a83037..dc2a15f 100644
--- a/src/main/java/org/apache/sling/auth/oauth_client/impl/OAuthCallbackServlet.java
+++ b/src/main/java/org/apache/sling/auth/oauth_client/impl/OAuthCallbackServlet.java
@@ -79,7 +79,6 @@ public class OAuthCallbackServlet extends SlingAllMethodsServlet {
private final Map<String, ClientConnection> connections;
private final OAuthTokenStore tokenStore;
- private final OAuthStateManager stateManager;
private final CryptoService cryptoService;
static String getCallbackUri(HttpServletRequest request) {
@@ -110,11 +109,9 @@ public class OAuthCallbackServlet extends SlingAllMethodsServlet {
public OAuthCallbackServlet(
@Reference(policyOption = GREEDY) List<ClientConnection> connections,
@Reference OAuthTokenStore tokenStore,
- @Reference OAuthStateManager stateManager,
@Reference CryptoService cryptoService) {
this.connections = connections.stream().collect(Collectors.toMap(ClientConnection::name, Function.identity()));
this.tokenStore = tokenStore;
- this.stateManager = stateManager;
this.cryptoService = cryptoService;
}
diff --git a/src/test/java/org/apache/sling/auth/oauth_client/impl/OAuthCallbackServletTest.java b/src/test/java/org/apache/sling/auth/oauth_client/impl/OAuthCallbackServletTest.java
index 26d455f..a30f85c 100644
--- a/src/test/java/org/apache/sling/auth/oauth_client/impl/OAuthCallbackServletTest.java
+++ b/src/test/java/org/apache/sling/auth/oauth_client/impl/OAuthCallbackServletTest.java
@@ -86,7 +86,7 @@ class OAuthCallbackServletTest {
tokenStore = new InMemoryOAuthTokenStore();
cryptoService = new StubCryptoService();
- servlet = new OAuthCallbackServlet(connections, tokenStore, new StubOAuthStateManager(), cryptoService);
+ servlet = new OAuthCallbackServlet(connections, tokenStore, cryptoService);
}
@AfterEach