Skip to content

Commit

Permalink
PR #12698 - fixes for SignInWithEthereumTest
Browse files Browse the repository at this point in the history
Signed-off-by: Lachlan Roberts <[email protected]>
  • Loading branch information
lachlan-roberts committed Jan 14, 2025
1 parent cf504e5 commit d7e2743
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -94,6 +96,7 @@ else if ("/logout".equals(pathInContext))
};

_authenticator = new EthereumAuthenticator();
_authenticator.setErrorPage("/error");

SecurityHandler.PathMapped securityHandler = new SecurityHandler.PathMapped();
securityHandler.setAuthenticator(_authenticator);
Expand Down

0 comments on commit d7e2743

Please sign in to comment.