Пример #1
0
        /// <inheritdoc/>
        public Task <IFactor> AddFactorAsync(string userId, AddCallFactorOptions callFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
        {
            if (callFactorOptions == null)
            {
                throw new ArgumentNullException(nameof(callFactorOptions));
            }

            var profile = new CallFactorProfile
            {
                PhoneExtension = callFactorOptions.PhoneExtension,
                PhoneNumber    = callFactorOptions.PhoneNumber
            };

            var factor = new CallFactor
            {
                FactorType = FactorType.Call,
                Provider   = FactorProvider.Okta,
                Profile    = profile,
            };

            return(AddFactorAsync(factor, userId, cancellationToken: cancellationToken));
        }
Пример #2
0
 public Task <IFactor> AddFactorAsync(AddCallFactorOptions callFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
 => GetClient().UserFactors.AddFactorAsync(Id, callFactorOptions, cancellationToken);