public WrapperImpersonationContext(string domain, string username, string password, CredentialsType type) { _domain = domain; _username = username; _password = password; _type = type; }
public CredentialsTypeVM(CredentialsType bo) { this.ID = bo.ID; this.Name = bo.Name; this.Description = bo.Description; this.SortCode = bo.SortCode; }
public Passenger(string name, PassengerType type, string certificateNumber, CredentialsType certificateType, string mobilephone) { Name = name; Type = type; CertificateNumber = certificateNumber; CertificateType = certificateType; Mobilephone = mobilephone; }
internal DatastoreCredentials(CredentialsType type, AccountKeySection accountKey, CertificateSection certificate, SasSection sas, ServicePrincipalSection servicePrincipal, SqlAdminSection sqlAdmin) { Type = type; AccountKey = accountKey; Certificate = certificate; Sas = sas; ServicePrincipal = servicePrincipal; SqlAdmin = sqlAdmin; }
public Passenger(string name, PassengerType type, string certificateNumber, CredentialsType certificateType, string mobilephone, List <string> ticketNumbers) { Name = name; Type = type; CertificateNumber = certificateNumber; CertificateType = certificateType; Mobilephone = mobilephone; TicketNumbers = ticketNumbers; }
private static CredentialsType createPasswordCredentials(string clearValue) { PasswordType passwordType = new PasswordType(); passwordType.value = createProtectedStringType(clearValue); CredentialsType retval = new CredentialsType(); retval.password = passwordType; return(retval); }
/// <summary> /// Retrieve credentials from the windows credential manager /// </summary> /// <param name="Name">Credential label (name)</param> /// <param name="authenticationType">The authentication Type</param> /// <returns></returns> public static ICredentials GetStoredCredentials(string Name, CredentialsType authenticationType) { ICredentials result = null; switch (authenticationType) { case CredentialsType.SharePointOnline: result = CredentialManager.GetSharePointOnlineCredential(Name); break; case CredentialsType.SharePointActiveDirectory: result = CredentialManager.GetCredential(Name); break; } return(result); }
public ActionResult CreateOrEdit(Guid id) { bool isNew = false; var bo = _Service.GetSingle(id); if (bo == null) { bo = new CredentialsType(); bo.ID = id; isNew = true; } var boVM = new CredentialsTypeVM(bo); var editor = PageComponentRepository <CredentialsTypeVM> .CreateOrEditDialog(boVM, isNew); return(Json(editor)); }
public ActionResult Save(CredentialsTypeVM boVM) { if (ModelState.IsValid) { var bo = _Service.GetSingle(boVM.ID); if (bo == null) { bo = new CredentialsType(); bo.ID = boVM.ID; } boVM.MapToBo(bo); _Service.AddOrEditAndSave(bo); return(Json(PageComponentRepository <CredentialsTypeVM> .SaveOK(true, "1", ""))); } else { var vItems = new List <ValidatorResult>(); foreach (var item in ModelState) { if (item.Value.Errors != null) { foreach (var vItem in item.Value.Errors) { var errItem = new ValidatorResult(); errItem.Name = item.Key; errItem.ErrorMessage = vItem.ErrorMessage; vItems.Add(errItem); } } } var editor = PageComponentRepository <CredentialsTypeVM> .UpdateCreateOrEditDialog(boVM, false, vItems).InnerHtmlContent; return(Json(editor)); } }
internal NoneDatastoreCredentials(CredentialsType credentialsType) : base(credentialsType) { CredentialsType = credentialsType; }
public ExecuteResult <ReservedPnr> SsrFoid(string pnrCode, string name, string oldNumber, string newNumber, CredentialsType certificateType, string userName) { var veService = new veSWScnService(); veService.Url = ReplaceUrl(veService.Url); string returnString = veService.SSRFOID(pnrCode, name, oldNumber, newNumber, certificateType.ToString(), "KMG215", userName); XDocument xdoc = XDocument.Parse(returnString, LoadOptions.None); returnString = xdoc.Element("VESSRFOID") != null ? xdoc.Element("VESSRFOID").Element("PNR").Value : returnString; string rawData = returnString; ReservedPnr result = Domain.Utility.Parser.GetPnrContent(rawData); return(new ExecuteResult <ReservedPnr> { Success = (result != null), Result = result, Message = rawData }); }
public DatastoreCredentials(CredentialsType type) { Type = type; }
/// <summary> /// Create a credentials object according to the authentication type /// </summary> /// <param name="userName">UserName or AppID</param> /// <param name="passWord">Password or AppSecret</param> /// <param name="authenticationType">The authentication type</param> /// <returns>ICredential implementation object</returns> public static ICredentials CreateCredentials(string userName, string passWord, CredentialsType authenticationType) { ICredentials result = null; switch (authenticationType) { case CredentialsType.SharePointOnline: SecureString securePassword = new SecureString(); foreach (char c in passWord.ToCharArray()) { securePassword.AppendChar(c); } result = new SharePointOnlineCredentials(userName, securePassword); break; case CredentialsType.SharePointActiveDirectory: result = new NetworkCredential(userName, passWord); break; } return(result); }
/// <summary> /// Create a credentials object according to the authentication type /// </summary> /// <param name="userName">UserName</param> /// <param name="securePassword">Password</param> /// <param name="authenticationType">The authentication Type</param> /// <returns>ICredential implementation object</returns> public static ICredentials CreateCredentials(string userName, SecureString securePassword, CredentialsType authenticationType) { ICredentials result = null; switch (authenticationType) { case CredentialsType.SharePointOnline: result = new SharePointOnlineCredentials(userName, securePassword); break; case CredentialsType.SharePointActiveDirectory: result = new NetworkCredential(userName, securePassword); break; } return(result); }
internal AuthType GetLdapAuthenticationTypes(ActiveDirectoryConnectionProtection connectionProtection, CredentialsType type) { return(this.ldapAuthTypes[(int)connectionProtection, (int)type]); }
private Credentials(CredentialsType credentialsType, string identifier, string secret) { Identifier = identifier; Secret = secret; CredentialsType = credentialsType; }
internal AuthType GetLdapAuthenticationTypes(ActiveDirectoryConnectionProtection connectionProtection, CredentialsType type) { return ldapAuthTypes[(int) connectionProtection, (int) type]; }
internal System.DirectoryServices.AuthenticationTypes GetAuthenticationTypes(ActiveDirectoryConnectionProtection connectionProtection, CredentialsType type) { return(this.authTypes[(int)connectionProtection, (int)type]); }
private bool updateCredentials(string passengerName, string oldCrendentials, string newCrendentials, CredentialsType passengerType, Guid oemId) { var execResult = CommandService.ModifyCertificateNumber(Code, passengerName, oldCrendentials, newCrendentials, passengerType, oemId); return(execResult.Success); }
internal DatastoreCredentials(CredentialsType credentialsType) { CredentialsType = credentialsType; }
public void MapToBo(CredentialsType bo) { bo.Name = this.Name; bo.Description = this.Description; bo.SortCode = this.SortCode; }
/// <summary> /// 根据给出的旅客订座记录编号和姓名,修改旅客证件号码。 /// </summary> /// <param name="pnrPair">旅客订座记录编号</param> /// <param name="name">旅客姓名</param> /// <param name="oldNumber">原证件号</param> /// <param name="newNumber">新证件号</param> /// <param name="type">证件类型</param> /// <param name="oemId">OEM编号</param> /// <returns></returns> public static ExecuteResult <ReservedPnr> ModifyCertificateNumber(PNRPair pnrPair, string name, string oldNumber, string newNumber, CredentialsType type, Guid oemId) { // 参数验证 if (PNRPair.IsNullOrEmpty(pnrPair)) { throw new ArgumentException("旅客订座记录编码"); } var userName = "******"; try { var repository = Factory.CreateCommandRepository(); PidManagementService.SaveCounter(oemId, true); var result = repository.SsrFoid(pnrPair.PNR, name, oldNumber, newNumber, type, userName); if (result.Success) { PidManagementService.SaveCounter(oemId, true); } return(result); } catch (Exception e) { return(new ExecuteResult <ReservedPnr>() { Success = false, Message = e.Message, Result = null }); } }
private static CredentialsType createPasswordCredentials(string clearValue) { PasswordType passwordType = new PasswordType(); passwordType.value = createProtectedStringType(clearValue); CredentialsType retval = new CredentialsType(); retval.password = passwordType; return retval; }