Skip to content

Commit

Permalink
Remove debug log message printing
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoujinsong committed Jul 9, 2024
1 parent 75e0ff0 commit d35108f
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ public class DashboardServer {

public static final Logger LOG = LoggerFactory.getLogger(DashboardServer.class);

private static final String AUTH_TYPE_BASIC = "basic";

private final CatalogController catalogController;
private final HealthCheckController healthCheckController;
private final LoginController loginController;
Expand Down Expand Up @@ -328,15 +330,12 @@ private EndpointGroup apiGroup() {
public void preHandleRequest(Context ctx) {
String uriPath = ctx.path();
if (needApiKeyCheck(uriPath)) {
if ("basic".equalsIgnoreCase(authType)) {
if (AUTH_TYPE_BASIC.equalsIgnoreCase(authType)) {
BasicAuthCredentials cred = ctx.basicAuthCredentials();
if (!(basicAuthUser.equals(cred.component1())
&& basicAuthPassword.equals(cred.component2()))) {
LOG.debug(
"Failed to authenticate via basic authentication. Request url: {} {}.",
ctx.req.getMethod(),
uriPath);
throw new SignatureCheckException();
throw new SignatureCheckException(
"Failed to authenticate via basic authentication for url:" + uriPath);
}
} else {
checkApiToken(
Expand Down

0 comments on commit d35108f

Please sign in to comment.