diff --git a/documentation/jetty/modules/code/examples/pom.xml b/documentation/jetty/modules/code/examples/pom.xml
index 3b33263fe13..e6a5f6e7a26 100644
--- a/documentation/jetty/modules/code/examples/pom.xml
+++ b/documentation/jetty/modules/code/examples/pom.xml
@@ -117,6 +117,10 @@
org.eclipse.jetty.websocket
jetty-websocket-jetty-server
+
+ org.eclipse.jetty
+ jetty-slf4j-impl
+
diff --git a/jetty-core/jetty-siwe/src/test/java/org/eclipse/jetty/security/siwe/example/SignInWithEthereumEmbeddedExample.java b/documentation/jetty/modules/code/examples/src/main/java/org/eclipse/jetty/docs/programming/security/siwe/SignInWithEthereumEmbeddedExample.java
similarity index 95%
rename from jetty-core/jetty-siwe/src/test/java/org/eclipse/jetty/security/siwe/example/SignInWithEthereumEmbeddedExample.java
rename to documentation/jetty/modules/code/examples/src/main/java/org/eclipse/jetty/docs/programming/security/siwe/SignInWithEthereumEmbeddedExample.java
index 433184cbdbc..7cebeafd045 100644
--- a/jetty-core/jetty-siwe/src/test/java/org/eclipse/jetty/security/siwe/example/SignInWithEthereumEmbeddedExample.java
+++ b/documentation/jetty/modules/code/examples/src/main/java/org/eclipse/jetty/docs/programming/security/siwe/SignInWithEthereumEmbeddedExample.java
@@ -11,7 +11,7 @@
// ========================================================================
//
-package org.eclipse.jetty.security.siwe.example;
+package org.eclipse.jetty.docs.programming.security.siwe;
import java.io.PrintWriter;
import java.nio.file.Paths;
@@ -43,8 +43,9 @@ public class SignInWithEthereumEmbeddedExample
server.addConnector(connector);
String resourcePath = Paths.get(Objects.requireNonNull(SignInWithEthereumEmbeddedExample.class.getClassLoader().getResource("")).toURI())
- .resolve("../../src/test/resources/")
+ .resolve("../../src/main/resources/")
.normalize().toString();
+ System.err.println(resourcePath);
ResourceHandler resourceHandler = new ResourceHandler();
resourceHandler.setDirAllowed(false);
resourceHandler.setBaseResourceAsString(resourcePath);
@@ -94,6 +95,7 @@ public class SignInWithEthereumEmbeddedExample
public static SecurityHandler createSecurityHandler(Handler handler)
{
+ // tag::configureSecurityHandler[]
// This uses jetty-core, but you can configure a ConstraintSecurityHandler for use with EE10.
SecurityHandler.PathMapped securityHandler = new SecurityHandler.PathMapped();
securityHandler.setHandler(handler);
@@ -108,6 +110,7 @@ public class SignInWithEthereumEmbeddedExample
// Or you can configure with parameters on the SecurityHandler.
securityHandler.setParameter(EthereumAuthenticator.LOGIN_PATH_PARAM, "/login.html");
+ // end::configureSecurityHandler[]
return securityHandler;
}
diff --git a/jetty-core/jetty-siwe/src/test/resources/login.html b/documentation/jetty/modules/code/examples/src/main/resources/login.html
similarity index 100%
rename from jetty-core/jetty-siwe/src/test/resources/login.html
rename to documentation/jetty/modules/code/examples/src/main/resources/login.html
diff --git a/documentation/jetty/modules/programming-guide/pages/security/siwe-support.adoc b/documentation/jetty/modules/programming-guide/pages/security/siwe-support.adoc
index 7a075ee2f8b..3f8b2ee3a54 100644
--- a/documentation/jetty/modules/programming-guide/pages/security/siwe-support.adoc
+++ b/documentation/jetty/modules/programming-guide/pages/security/siwe-support.adoc
@@ -119,7 +119,7 @@ The nonce endpoint provided by the `EthereumAuthenticator` returns a response wi
=== Configuring Security Handler
[,java,indent=0]
----
-include::code:example$src/main/java/org/eclipse/jetty/docs/programming/security/siwe/SignInWithEthereum.java[tags=configureSecurityHandler]
+include::code:example$src/main/java/org/eclipse/jetty/docs/programming/security/siwe/SignInWithEthereumEmbeddedExample.java[tags=configureSecurityHandler]
----
=== Login Page Example