copper-server-ldap/src/main/java/com/pogeyan/cmis/ldap/auth/LDAPAuthService.java
/**
	 * fetch repository MRepository based on RepositoryId from CallContext and Takes
	 * user and password from the CallContext and checks them.
	 */
fetch repository MRepository based on RepositoryId from CallContext and Takes
user and password from the CallContext and checks them.
fetch repository MRepository based on RepositoryId from CallContext and Takes user and password from the CallContext and checks them .
private LDAPLogin authenticateInternal(String repositoryId, String userName, String password)
			throws CmisPermissionDeniedException {
		LoginProperties loginProperties = new LoginProperties();
		if (StringUtils.isNotBlank(this.storeSettings.getCompanyName())) {
			loginProperties.setCompanyName(this.storeSettings.getCompanyName());
		}
		loginProperties.setAdminUser(this.storeSettings.getAdminUser());
		loginProperties.setPort(this.storeSettings.getPort());
		loginProperties.setServerName(this.storeSettings.getServerName());
		loginProperties.setUserName(userName);
		loginProperties.setPassword(password);
		loginProperties.setMasterCompany(this.storeSettings.getMastercompany());
		loginProperties.setUserIdAttribute(this.storeSettings.getUserIdAttribute());
		LDAPLogin login;
		try {
			login = LDAPUtils.login(loginProperties);
			if (login != null) {
				LOG.info("LDAP login successfull {}", userName);
				return login;
			}
		} catch (Exception e) {
			LOG.error("writeContent exception: {}, {}", e.getMessage(), ExceptionUtils.getStackTrace(e));
		}
		throw new CmisPermissionDeniedException("Login authentication failed for user: " + userName);
	}
private LDAPLogin authenticateInternal ( String repositoryId , String userName , String password ) throws CmisPermissionDeniedException { LoginProperties loginProperties = new LoginProperties ( ) ; if ( StringUtils . isNotBlank ( this . storeSettings . getCompanyName ( ) ) ) { loginProperties . setCompanyName ( this . storeSettings . getCompanyName ( ) ) ; } loginProperties . setAdminUser ( this . storeSettings . getAdminUser ( ) ) ; loginProperties . setPort ( this . storeSettings . getPort ( ) ) ; loginProperties . setServerName ( this . storeSettings . getServerName ( ) ) ; loginProperties . setUserName ( userName ) ; loginProperties . setPassword ( password ) ; loginProperties . setMasterCompany ( this . storeSettings . getMastercompany ( ) ) ; loginProperties . setUserIdAttribute ( this . storeSettings . getUserIdAttribute ( ) ) ; LDAPLogin login ; try { login = LDAPUtils . login ( loginProperties ) ; if ( login != null ) { LOG . info ( "LDAP login successfull {}" , userName ) ; return login ; } } catch ( Exception e ) { LOG . error ( "writeContent exception: {}, {}" , e . getMessage ( ) , ExceptionUtils . getStackTrace ( e ) ) ; } throw new CmisPermissionDeniedException ( "Login authentication failed for user: " + userName ) ; }
fetch repository MRepository based on RepositoryId from CallContext and Takes
 user and password from the CallContext and checks them.
fetch repository MRepository based on RepositoryId from CallContext and Takes user and password from the CallContext and checks them .