public LoginResponse(Utente utente, UserLogin.LoginResult loginResult) { if (loginResult == DocsPaVO.utente.UserLogin.LoginResult.OK) { this.UserInfo = UserInfo.buildInstance(utente); this.Code = LoginResponseCode.OK; } else if (loginResult == DocsPaVO.utente.UserLogin.LoginResult.UNKNOWN_USER) { this.Code = LoginResponseCode.USER_NOT_FOUND; } else if (loginResult == DocsPaVO.utente.UserLogin.LoginResult.PASSWORD_EXPIRED) { this.Code = LoginResponseCode.PASSWORD_EXPIRED; } else { this.Code = LoginResponseCode.SYSTEM_ERROR; } }
/// <summary> /// /// </summary> /// <param name="userName"></param> /// <param name="password"></param> /// <param name="loginResult"></param> /// <returns></returns> public static string LoginUserDctm(string userName, string password, string idAmministrazione, out UserLogin.LoginResult loginResult) { DocsPaDocumentale.Interfaces.IUserManager userManager = new DocsPaDocumentale_DOCUMENTUM.Documentale.UserManager(); Utente utente; userManager.LoginUser(GetUserLogin(userName, password, idAmministrazione), out utente, out loginResult); if (loginResult == UserLogin.LoginResult.OK) { return(utente.dst); } else { return(string.Empty); } }
/// <summary> /// Connessione dell'utente amministratore al sistema DocsPa /// </summary> /// <param name="userName"></param> /// <param name="password"></param> /// <param name="loginResult"></param> /// <returns></returns> public static InfoUtenteAmministratore LoginAdmin(string userName, string password, out UserLogin.LoginResult loginResult) { InfoUtenteAmministratore infoUtente; DocsPaDocumentale.Interfaces.IUserManager userManager = new DocsPaDocumentale_PITRE.Documentale.UserManager(); userManager.LoginAdminUser(GetUserLogin(userName, password), true, out infoUtente, out loginResult); return(infoUtente); }