diff --git a/src/main/java/com/firebolt/jdbc/connection/FireboltConnectionUserPasswordAuthentication.java b/src/main/java/com/firebolt/jdbc/connection/FireboltConnectionUserPasswordAuthentication.java index 51a135eb6..48a9ecf85 100644 --- a/src/main/java/com/firebolt/jdbc/connection/FireboltConnectionUserPasswordAuthentication.java +++ b/src/main/java/com/firebolt/jdbc/connection/FireboltConnectionUserPasswordAuthentication.java @@ -47,14 +47,10 @@ public class FireboltConnectionUserPasswordAuthentication extends FireboltConnec @Override protected void authenticate() throws SQLException { - if (loginProperties.isSystemEngine()) { - this.sessionProperties = loginProperties; - } else { - String accessToken = getAccessToken(loginProperties).orElse(StringUtils.EMPTY); - FireboltProperties propertiesWithAccessToken = loginProperties.toBuilder().accessToken(accessToken).build(); - Engine engine = fireboltEngineService.getEngine(propertiesWithAccessToken); - this.sessionProperties = loginProperties.toBuilder().host(engine.getEndpoint()).engine(engine.getName()).build(); - } + String accessToken = getAccessToken(loginProperties).orElse(StringUtils.EMPTY); + FireboltProperties propertiesWithAccessToken = loginProperties.toBuilder().accessToken(accessToken).build(); + Engine engine = fireboltEngineService.getEngine(propertiesWithAccessToken); + this.sessionProperties = loginProperties.toBuilder().host(engine.getEndpoint()).engine(engine.getName()).build(); } @Override