Skip to content

Commit

Permalink
restored authenticate() - still does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
alexradzin committed Nov 14, 2023
1 parent 85d68da commit 8d3f1ff
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8d3f1ff

Please sign in to comment.