Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoran10 committed Dec 8, 2023
1 parent e09d0c2 commit a6ca305
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,10 @@ private void doAuthentication(AuthData clientData,
if (state != State.Connected) {
// First time authentication is done
if (service.isAuthenticationEnabled()) {
if (!useOriginalAuthState) {
this.authRole = newAuthRole;
this.authenticationData = newAuthDataSource;
}
if (service.isAuthorizationEnabled()) {
if (!service.getAuthorizationService()
.isValidOriginalPrincipal(this.authRole, originalPrincipal, remoteAddress, false)) {
Expand All @@ -669,10 +673,6 @@ private void doAuthentication(AuthData clientData,
return;
}
}
if (!useOriginalAuthState) {
this.authRole = newAuthRole;
this.authenticationData = newAuthDataSource;
}
maybeScheduleAuthenticationCredentialsRefresh();
}
completeConnect(clientProtocolVersion, clientVersion);
Expand Down

0 comments on commit a6ca305

Please sign in to comment.