Exemplo n.º 1
0
        /// <inheritdoc/>
        public Task <IFactor> AddFactorAsync(string userId, AddEmailFactorOptions emailFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
        {
            if (emailFactorOptions == null)
            {
                throw new ArgumentNullException(nameof(emailFactorOptions));
            }

            var profile = new EmailFactorProfile
            {
                Email = emailFactorOptions.Email
            };

            var factor = new EmailFactor
            {
                FactorType = FactorType.Email,
                Provider   = FactorProvider.Okta,
                Profile    = profile,
            };

            return(AddFactorAsync(factor, userId, cancellationToken: cancellationToken));
        }
Exemplo n.º 2
0
 public Task <IFactor> AddFactorAsync(AddEmailFactorOptions emailFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
 => GetClient().UserFactors.AddFactorAsync(Id, emailFactorOptions, cancellationToken);