Skip to content

Commit

Permalink
FM2-616: Fix authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
ibacher committed Mar 11, 2024
1 parent 6e9baf5 commit 6b3e271
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha
basicAuth = basicAuth.substring(6); // remove the leading "Basic "
String decoded = new String(Base64.decodeBase64(basicAuth), StandardCharsets.UTF_8);
String[] userAndPass = decoded.split(":");
UsernamePasswordAuthenticationScheme usernamePasswordAuthenticationScheme = new UsernamePasswordAuthenticationScheme();
usernamePasswordAuthenticationScheme
.authenticate(new UsernamePasswordCredentials(userAndPass[0], userAndPass[1]));
UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(userAndPass[0], userAndPass[1]);
Context.authenticate(credentials);
}
catch (Exception e) {
HttpServletResponse httpResponse = (HttpServletResponse) response;
Expand Down

0 comments on commit 6b3e271

Please sign in to comment.