diff --git a/jetty-integrations/jetty-ethereum/src/test/java/org/eclipse/jetty/security/siwe/SignInWithEthereumTest.java b/jetty-integrations/jetty-ethereum/src/test/java/org/eclipse/jetty/security/siwe/SignInWithEthereumTest.java index 9707c51d0e3d..20b88d377449 100644 --- a/jetty-integrations/jetty-ethereum/src/test/java/org/eclipse/jetty/security/siwe/SignInWithEthereumTest.java +++ b/jetty-integrations/jetty-ethereum/src/test/java/org/eclipse/jetty/security/siwe/SignInWithEthereumTest.java @@ -72,7 +72,9 @@ public boolean handle(Request request, Response response, Callback callback) thr String pathInContext = Request.getPathInContext(request); if ("/error".equals(pathInContext)) { - response.write(true, BufferUtil.toBuffer("ERROR"), callback); + response.setStatus(HttpStatus.FORBIDDEN_403); + String error = Request.getParameters(request).get(EthereumAuthenticator.ERROR_PARAMETER).getValue(); + response.write(true, BufferUtil.toBuffer(error), callback); return true; } if ("/login".equals(pathInContext)) @@ -94,6 +96,7 @@ else if ("/logout".equals(pathInContext)) }; _authenticator = new EthereumAuthenticator(); + _authenticator.setErrorPage("/error"); SecurityHandler.PathMapped securityHandler = new SecurityHandler.PathMapped(); securityHandler.setAuthenticator(_authenticator);