コード例 #1
0
        /// <inheritdoc/>
        public Task <IFactor> AddFactorAsync(string userId, AddSecurityQuestionFactorOptions securityQuestionFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
        {
            if (securityQuestionFactorOptions == null)
            {
                throw new ArgumentNullException(nameof(securityQuestionFactorOptions));
            }

            var profile = new SecurityQuestionFactorProfile
            {
                Question = securityQuestionFactorOptions.Question,
                Answer   = securityQuestionFactorOptions.Answer,
            };

            var factor = new SecurityQuestionFactor
            {
                FactorType = FactorType.Question,
                Provider   = FactorProvider.Okta,
                Profile    = profile,
            };

            return(AddFactorAsync(factor, userId, cancellationToken: cancellationToken));
        }
コード例 #2
0
ファイル: User.cs プロジェクト: satishfied/okta-sdk-dotnet
 public Task <IFactor> AddFactorAsync(AddSecurityQuestionFactorOptions securityQuestionFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
 => GetClient().UserFactors.AddFactorAsync(Id, securityQuestionFactorOptions, cancellationToken);