Exemple #1
0
        /// <inheritdoc/>
        public Task <IFactor> AddFactorAsync(string userId, AddSmsFactorOptions smsFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
        {
            if (smsFactorOptions == null)
            {
                throw new ArgumentNullException(nameof(smsFactorOptions));
            }

            var profile = new SmsFactorProfile
            {
                PhoneNumber = smsFactorOptions.PhoneNumber
            };

            var factor = new SmsFactor
            {
                FactorType = FactorType.Sms,
                Provider   = FactorProvider.Okta,
                Profile    = profile,
            };

            return(AddFactorAsync(factor, userId, cancellationToken: cancellationToken));
        }
Exemple #2
0
 public Task <IFactor> AddFactorAsync(AddSmsFactorOptions smsFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
 => GetClient().UserFactors.AddFactorAsync(Id, smsFactorOptions, cancellationToken);