Skip to content

Commit

Permalink
Do not provide message on external authn error
Browse files Browse the repository at this point in the history
  • Loading branch information
rmiccoli authored and enricovianello committed Jul 4, 2023
1 parent d725c3c commit 2e76048
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ private String buildRedirectURL(AuthenticationException exception) {

return UriComponentsBuilder.fromPath("/login")
.queryParam("error", "true")
.queryParam("externalAuthenticationError", errorMessage)
.build(true)
.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
<c:if test="${ param.externalAuthenticationError != null }">
<div class="alert alert-danger">
<strong>External authentication error</strong>
<div>${param.externalAuthenticationError}</div>
</div>
</c:if>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ public void testValidatorError() throws JOSEException,
UriComponentsBuilder.fromUri(response.getHeaders().getLocation()).build();

assertThat(locationUri.getPath(), equalTo("/login"));
assertThat(locationUri.getQueryParams().keySet(), hasItem("externalAuthenticationError"));
assertThat(locationUri.getQueryParams().getFirst("externalAuthenticationError"), is("always%20fails"));
assertThat(locationUri.getQueryParams().keySet(), hasItem("error"));
assertThat(locationUri.getQueryParams().getFirst("error"), is("true"));
}


Expand Down

0 comments on commit 2e76048

Please sign in to comment.