if (!Strings.isNullOrEmpty(password)) {
final String userName = Util.getUserNameWithDomain(user, domain);
LOGGER.log(Level.INFO, "Authenticating User: " + userName);
sharepointClientContext.setUsername(userName);
sharepointClientContext.setPassword(password);
BulkAuthorizationHelper bulkAuth = new BulkAuthorizationHelper(
sharepointClientContext);
/*
* If you can make a call to Web Service with the given credential, the
* user is valid user. This should not be assumed as a valid SharePoint
* user. A valid user is any user who is identified on the SharePoint
* server.The Google Services deployed on the SharePoint server can be
* called with such user credentials.
*
* If Authentication is successful get groups information from
* UserDataStore data base for a given user and add it to
* AuthenticationResponse. *
*/
if (SPConstants.CONNECTIVITY_SUCCESS.equalsIgnoreCase(bulkAuth.checkConnectivity())) {
LOGGER.log(Level.INFO, "Authentication succeeded for the user : "
+ user + " with identity : " + userName);
if (sharepointClientContext.isPushAcls() && null != this.ldapService) {
return getAllGroupsForTheUser(user);
} else {