/// <summary> /// Builds a question <see cref="Factor"/>. /// </summary> /// <param name="questionType">Type of the question.</param> /// <param name="answer">The answer.</param> /// <returns>A question <see cref="Factor"/></returns> public static Factor BuildQuestion(string questionType, string answer) { var profile = new FactorProfile { QuestionType = questionType, Answer = answer }; return(new Factor { FactorType = Models.FactorType.Question, Provider = FactorProviderType.Okta, Profile = profile }); }
/// <summary> /// Builds an SMS <see cref="Factor"/>. /// </summary> /// <param name="phoneNumber">The phone number.</param> /// <param name="forceUpdate">if set to <c>true</c> [force update].</param> /// <returns>An SMS <see cref="Factor"/></returns> public static Factor BuildSms(string phoneNumber, bool forceUpdate = false) { var profile = new FactorProfile { PhoneNumber = phoneNumber }; profile.SetProperty("updatePhone", forceUpdate); return(new Factor { FactorType = Models.FactorType.Sms, Provider = FactorProviderType.Okta, Profile = profile }); }
public Factor() { Profile = new FactorProfile(); }