mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Merge staging/1.1.0 changes back to master.
This commit is contained in:
@@ -204,18 +204,26 @@ public class AuthenticationProviderService {
|
|||||||
|
|
||||||
// Attempt bind
|
// Attempt bind
|
||||||
LdapNetworkConnection ldapConnection = ldapService.bindAs(bindDn, password);
|
LdapNetworkConnection ldapConnection = ldapService.bindAs(bindDn, password);
|
||||||
|
try {
|
||||||
// Retrieve group membership of the user that just authenticated
|
|
||||||
Set<String> effectiveGroups =
|
|
||||||
userGroupService.getParentUserGroupIdentifiers(ldapConnection,
|
|
||||||
bindDn);
|
|
||||||
|
|
||||||
// Return AuthenticatedUser if bind succeeds
|
// Retrieve group membership of the user that just authenticated
|
||||||
LDAPAuthenticatedUser authenticatedUser = authenticatedUserProvider.get();
|
Set<String> effectiveGroups =
|
||||||
authenticatedUser.init(credentials, getAttributeTokens(ldapConnection,
|
userGroupService.getParentUserGroupIdentifiers(ldapConnection,
|
||||||
bindDn), effectiveGroups, bindDn);
|
bindDn);
|
||||||
|
|
||||||
return authenticatedUser;
|
// Return AuthenticatedUser if bind succeeds
|
||||||
|
LDAPAuthenticatedUser authenticatedUser = authenticatedUserProvider.get();
|
||||||
|
authenticatedUser.init(credentials, getAttributeTokens(ldapConnection,
|
||||||
|
bindDn), effectiveGroups, bindDn);
|
||||||
|
|
||||||
|
return authenticatedUser;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Always disconnect
|
||||||
|
finally {
|
||||||
|
ldapService.disconnect(ldapConnection);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user