private void PasswordOkButton_Click(object sender, RoutedEventArgs e) { credential = Credential.Create(new PasswordEnrollmentData(OldPasswordTextBox.Password, NewPasswordTextBox.Password)); DialogResult = true; Close(); }
private void OtpOkButton_Click(object sender, RoutedEventArgs e) { if (string.IsNullOrEmpty(OneTimePasswordTextBox.Text)) { return; } credential = Credential.Create(new OtpEnrollmentData(OneTimePasswordTextBox.Text, otpEnrollmentKey)); DialogResult = true; }
private void CardOkButton_Click(object sender, RoutedEventArgs e) { var card = CardsListBox.SelectedItem as Tuple <string, Card>; if (card == null) { return; } credential = Credential.Create(new CardEnrollmentData(card.Item2.Id)); DialogResult = true; }
/// <summary> /// EnrollUserCredentials method enrolls (or re-enrolls) specific credentials for specific user and store credential data in Altus (AD) database. /// This method will work for both Altus and Altus AD backend servers. /// </summary> /// <param name="officerTicket">JSON Web Token of Security Officer.</param> /// <param name="owner">JSON Web Token of the owner of credentials.</param> /// <param name="credential">Credential to be enrolled</param> /// <remarks> /// Security Officer should use DigitalPersona Web AUTH Service to authenticate itself and acquire this token. /// Token must be valid to call succeeded. To be valid token must be: /// 1) issued no longer than 10 minutes before the operation, /// 2) one of the Primary credentials must be used to acquire this token and /// 3) token owner must have a rights to enroll user in Altus (AD LDS) or Altus AD (Active Directory) database. /// /// User should use DigitalPersona Web AUTH Service to authenticate itself and acquire this token. /// Token must be valid to call succeeded. To be valid token must be: /// 1) issued no longer than 10 minutes before the operation, /// 2) one of the Primary credentials (or same credentials) must be used to acquire this token. /// </remarks> public async Task EnrollCredential(Ticket officerTicket, Ticket owner, IEnrollmentCredential credential) { /*if (officerTicket == null) * throw new ArgumentNullException("officerTicket"); */ if (owner == null) { throw new ArgumentNullException("owner"); } if (credential == null) { throw new ArgumentNullException("credential"); } await EnrollCredentialCore(officerTicket, owner, credential); }
private void LiveQuestionButton_Click(object sender, RoutedEventArgs e) { if (LiveAnswers.Any(string.IsNullOrWhiteSpace) || SelectedQuestions.Any(p => p == null)) { return; } var answerData = new List <LiveQuestionAnswer>(); for (int i = 0; i < 3; i++) { answerData.Add(new LiveQuestionAnswer(SelectedQuestions[i], LiveAnswers[i])); } credential = Credential.Create(new LiveQuestionEnrollmentData(answerData)); DialogResult = true; }
private void FingerprintOkButton_Click(object sender, RoutedEventArgs e) { if (fingerprintImage == null) { return; } FingerPosition position = FingerPosition.Unknown; if (FingerprintPosition.SelectedIndex >= 0) { position = (FingerPosition)(FingerprintPosition.SelectedIndex + 1); } credential = Credential.Create(new FingerprintEnrollmentData(position, fingerprintEnrollmentData)); DialogResult = true; Close(); }
private async Task EnrollCredentialCore(Ticket officerTicket, Ticket owner, IEnrollmentCredential credential) { try { var request = HttpHelper.CreateHttpRequest(GetRequestUri("/EnrollUserCredentials"), RequestMethod.Put); var postParameters = new List <BodyParameter> { new BodyParameter("secOfficer", officerTicket), new BodyParameter("owner", owner), new BodyParameter("credential", credential) }; await request.WritePostParameters(postParameters.ToArray()); await request.GetResponseData(); } catch (WebException ex) { throw GetServiceException(ex); } }
/// <summary> /// EnrollUserCredentials method enrolls (or re-enrolls) specific credentials for specific user and store credential data in Altus (AD) database. /// This method will work for both Altus and Altus AD backend servers. /// </summary> /// <param name="owner">JSON Web Token of the owner of credentials.</param> /// <param name="credential">Credential to be enrolled</param> /// <remarks> /// User should use DigitalPersona Web AUTH Service to authenticate itself and acquire this token. /// Token must be valid to call succeeded. To be valid token must be: /// 1) issued no longer than 10 minutes before the operation, /// 2) one of the Primary credentials (or same credentials) must be used to acquire this token. /// 3) user should have rights to enroll himself /// </remarks> public Task EnrollCredential(Ticket owner, IEnrollmentCredential credential) { return(EnrollCredentialCore(null, owner, credential)); }
private void PinOkButton_Click(object sender, RoutedEventArgs e) { credential = Credential.Create(new PinEnrollmentData(PinTextBox.Text)); DialogResult = true; Close(); }