/// <summary> /// Este metodo es para se usado cuano la autenticacion contra LDAP /// </summary> /// <param name="pUserName"></param> /// <param name="pPassword"></param> /// <param name="pDomain"></param> /// <returns></returns> public LoginResult AuthenticateUser_AD(String pUserName, String pPassword, String pDomain) { ADWrapper wADWrapper = StaticsValues.Find_ADWrapper(pDomain); LoginResult wLoginResult = wADWrapper.User_CheckLogin(pUserName, pPassword); switch (wLoginResult) { //case LoginResult.LOGIN_OK: // //pasa // break; case LoginResult.ERROR_PASSWORD_EXPIRED: throw new AuthenticationException("La clave ha expirado."); case LoginResult.ERROR_PASSWORD_MUST_CHANGE: throw new AuthenticationException("El usuario debe cambiar la clave."); case LoginResult.LOGIN_USER_ACCOUNT_INACTIVE: throw new AuthenticationException("La cuenta se encuentra deshabilitada."); case LoginResult.LOGIN_USER_ACCOUNT_LOCKOUT: throw new AuthenticationException("La cuenta se encuentra bloqueada."); case LoginResult.LOGIN_USER_DOESNT_EXIST: throw new AuthenticationException("Error en nombre de usuario y/o clave."); case LoginResult.LOGIN_USER_OR_PASSWORD_INCORRECT: throw new AuthenticationException("Error en nombre de usuario y/o clave."); default: throw new FunctionalException("Error desconocido."); } //return true;//this.AuthenticateUser(pUserName,pUserName,out pUser); //// Se baja el Flag MustChangePassword porque es solo para autenticación Mixta, no importa el valor que tenga //wUserInfo.MustChangePassword = false; }