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 2024/09/19 16:10:23 UTC
(sling-samples) 13/15: chore(oauth): adapt to upstream changes
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-samples.git
commit 33e568813ef8fa47f5c52660c1a55a9780a492bd
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Sep 19 14:59:44 2024 +0200
chore(oauth): adapt to upstream changes
---
oauth/core/pom.xml | 2 +-
.../samples/oauth_demo/impl/YoutubeSearchServlet.java | 14 +++++++-------
oauth/launcher/pom.xml | 2 +-
oauth/launcher/src/main/features/launcher.json | 2 +-
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/oauth/core/pom.xml b/oauth/core/pom.xml
index 1feabe1..7b8a30f 100644
--- a/oauth/core/pom.xml
+++ b/oauth/core/pom.xml
@@ -150,7 +150,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
- <artifactId>org.apache.sling.extensions.oidc-rp</artifactId>
+ <artifactId>org.apache.sling.extensions.oauth-client</artifactId>
<version>0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
diff --git a/oauth/core/src/main/java/org/apache/sling/samples/oauth_demo/impl/YoutubeSearchServlet.java b/oauth/core/src/main/java/org/apache/sling/samples/oauth_demo/impl/YoutubeSearchServlet.java
index da3ff43..363e251 100644
--- a/oauth/core/src/main/java/org/apache/sling/samples/oauth_demo/impl/YoutubeSearchServlet.java
+++ b/oauth/core/src/main/java/org/apache/sling/samples/oauth_demo/impl/YoutubeSearchServlet.java
@@ -25,11 +25,11 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.request.RequestDispatcherOptions;
-import org.apache.sling.extensions.oidc_rp.OidcClient;
-import org.apache.sling.extensions.oidc_rp.OidcConnection;
-import org.apache.sling.extensions.oidc_rp.OidcToken;
-import org.apache.sling.extensions.oidc_rp.OidcTokenStore;
-import org.apache.sling.extensions.oidc_rp.support.OAuthEnabledSlingServlet;
+import org.apache.sling.extensions.oauth_client.OAuthToken;
+import org.apache.sling.extensions.oauth_client.OAuthTokenRefresher;
+import org.apache.sling.extensions.oauth_client.OAuthTokenStore;
+import org.apache.sling.extensions.oauth_client.OidcConnection;
+import org.apache.sling.extensions.oauth_client.support.OAuthEnabledSlingServlet;
import org.apache.sling.samples.oauth_demo.YoutubeSearchResponse;
import org.apache.sling.servlets.annotations.SlingServletResourceTypes;
import org.jetbrains.annotations.NotNull;
@@ -44,7 +44,7 @@ public class YoutubeSearchServlet extends OAuthEnabledSlingServlet {
private static final long serialVersionUID = 1L;
@Activate
- public YoutubeSearchServlet(@Reference OidcConnection connection, @Reference OidcTokenStore tokenStore, @Reference OidcClient oidcClient) {
+ public YoutubeSearchServlet(@Reference OidcConnection connection, @Reference OAuthTokenStore tokenStore, @Reference OAuthTokenRefresher oidcClient) {
super(connection, tokenStore, oidcClient);
}
@@ -55,7 +55,7 @@ public class YoutubeSearchServlet extends OAuthEnabledSlingServlet {
@Override
protected void doGetWithToken(@NotNull SlingHttpServletRequest request, @NotNull SlingHttpServletResponse response,
- OidcToken token) throws IOException, ServletException {
+ OAuthToken token) throws IOException, ServletException {
try {
String search = request.getParameter("search");
diff --git a/oauth/launcher/pom.xml b/oauth/launcher/pom.xml
index 7758ca2..28d8e68 100644
--- a/oauth/launcher/pom.xml
+++ b/oauth/launcher/pom.xml
@@ -59,7 +59,7 @@
<filesInclude>*.json</filesInclude>
<includeArtifact>
<groupId>org.apache.sling</groupId>
- <artifactId>org.apache.sling.extensions.oidc-rp</artifactId>
+ <artifactId>org.apache.sling.extensions.oauth-client</artifactId>
<classifier>app</classifier>
<version>0.1-SNAPSHOT</version>
<type>slingosgifeature</type>
diff --git a/oauth/launcher/src/main/features/launcher.json b/oauth/launcher/src/main/features/launcher.json
index 76ff1e3..20e2c90 100644
--- a/oauth/launcher/src/main/features/launcher.json
+++ b/oauth/launcher/src/main/features/launcher.json
@@ -5,7 +5,7 @@
"start-order": 25
},
{
- "id": "org.apache.sling/org.apache.sling.extensions.oidc-rp/0.1-SNAPSHOT",
+ "id": "org.apache.sling/org.apache.sling.extensions.oauth-client/0.1-SNAPSHOT",
"start-order": 24
}
],