API version:
Show / Hide Table of Contents

Class UserFactorsClient

A client that works with Okta UserFactor resources.

Inheritance
System.Object
OktaClient
UserFactorsClient
Implements
IOktaClient
IUserFactorsClient
Inherited Members
OktaClient.Configuration
OktaClient.CreateScoped(RequestContext)
OktaClient.UserTypes
OktaClient.Users
OktaClient.UserFactors
OktaClient.Groups
OktaClient.Applications
OktaClient.Sessions
OktaClient.AuthorizationServers
OktaClient.Logs
OktaClient.Policies
OktaClient.EventHooks
OktaClient.InlineHooks
OktaClient.LinkedObjects
OktaClient.TrustedOrigins
OktaClient.Features
OktaClient.Templates
OktaClient.NetworkZones
OktaClient.Domains
OktaClient.IdentityProviders
OktaClient.UserSchemas
OktaClient.GetCollectionClient<T>(HttpRequest)
OktaClient.GetAsync<T>(String, CancellationToken)
OktaClient.GetAsync<T>(HttpRequest, CancellationToken)
OktaClient.GetCollection<T>(String)
OktaClient.GetCollection<T>(HttpRequest)
OktaClient.PostAsync(String, Object, CancellationToken)
OktaClient.PostAsync<TResponse>(String, Object, CancellationToken)
OktaClient.PostAsync(HttpRequest, CancellationToken)
OktaClient.PostAsync<TResponse>(HttpRequest, CancellationToken)
OktaClient.PutAsync(String, Object, CancellationToken)
OktaClient.PutAsync<TResponse>(String, Object, CancellationToken)
OktaClient.PutAsync(HttpRequest, CancellationToken)
OktaClient.PutAsync<TResponse>(HttpRequest, CancellationToken)
OktaClient.DeleteAsync(String, CancellationToken)
OktaClient.DeleteAsync(HttpRequest, CancellationToken)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Okta.Sdk
Assembly: Okta.Sdk.dll
Syntax
public sealed class UserFactorsClient : OktaClient, IOktaClient, IUserFactorsClient

Methods

ActivateFactorAsync(IActivateFactorRequest, String, String, CancellationToken)

The sms and token:software:totp factor types require activation to complete the enrollment process.

Declaration
public Task<IUserFactor> ActivateFactorAsync(IActivateFactorRequest body, string userId, string factorId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IActivateFactorRequest body

The IActivateFactorRequest resource.

System.String userId
System.String factorId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IUserFactor>

The IUserFactor response.

ActivateFactorAsync(String, String, CancellationToken)

The sms and token:software:totp factor types require activation to complete the enrollment process.

Declaration
public Task<IUserFactor> ActivateFactorAsync(string userId, string factorId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId

The user ID.

System.String factorId

The factor Id.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IUserFactor>

The IUserFactor response.

AddFactorAsync(String, AddCallFactorOptions, CancellationToken)

Enrolls a user with a call factor

Declaration
public Task<IUserFactor> AddFactorAsync(string userId, AddCallFactorOptions callFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId

The user id

AddCallFactorOptions callFactorOptions

The call factor options

System.Threading.CancellationToken cancellationToken

The cancellation token

Returns
Type Description
System.Threading.Tasks.Task<IUserFactor>

The IUserFactor resource

AddFactorAsync(String, AddCustomHotpFactorOptions, CancellationToken)

Enrolls a user with a token:hotp factor

Declaration
public Task<IUserFactor> AddFactorAsync(string userId, AddCustomHotpFactorOptions hotpFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId

The user id

AddCustomHotpFactorOptions hotpFactorOptions

The token:hotp factor options

System.Threading.CancellationToken cancellationToken

The cancellation token

Returns
Type Description
System.Threading.Tasks.Task<IUserFactor>

The IUserFactor resource

AddFactorAsync(String, AddEmailFactorOptions, CancellationToken)

Enrolls a user with an email factor

Declaration
public Task<IUserFactor> AddFactorAsync(string userId, AddEmailFactorOptions emailFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId

The user id

AddEmailFactorOptions emailFactorOptions

The email factor options

System.Threading.CancellationToken cancellationToken

The cancellation token

Returns
Type Description
System.Threading.Tasks.Task<IUserFactor>

The IUserFactor resource

AddFactorAsync(String, AddHardwareFactorOptions, CancellationToken)

Enrolls a user with a hardware factor

Declaration
public Task<IUserFactor> AddFactorAsync(string userId, AddHardwareFactorOptions hardwareFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId

The user id

AddHardwareFactorOptions hardwareFactorOptions

The hardware factor options

System.Threading.CancellationToken cancellationToken

The cancellation token

Returns
Type Description
System.Threading.Tasks.Task<IUserFactor>

The IUserFactor resource

AddFactorAsync(String, AddPushFactorOptions, CancellationToken)

Enrolls a user with a push factor

Declaration
public Task<IUserFactor> AddFactorAsync(string userId, AddPushFactorOptions pushFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId

The user id

AddPushFactorOptions pushFactorOptions

The push factor options

System.Threading.CancellationToken cancellationToken

The cancellation token

Returns
Type Description
System.Threading.Tasks.Task<IUserFactor>

The IUserFactor resource

AddFactorAsync(String, AddSecurityQuestionFactorOptions, CancellationToken)

Enrolls a user with a security question factor

Declaration
public Task<IUserFactor> AddFactorAsync(string userId, AddSecurityQuestionFactorOptions securityQuestionFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId

The user id

AddSecurityQuestionFactorOptions securityQuestionFactorOptions

The security question factor options

System.Threading.CancellationToken cancellationToken

The cancellation token

Returns
Type Description
System.Threading.Tasks.Task<IUserFactor>

The IUserFactor resource

AddFactorAsync(String, AddSmsFactorOptions, CancellationToken)

Enrolls a user with a sms factor

Declaration
public Task<IUserFactor> AddFactorAsync(string userId, AddSmsFactorOptions smsFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId

The user id

AddSmsFactorOptions smsFactorOptions

The sms factor options

System.Threading.CancellationToken cancellationToken

The cancellation token

Returns
Type Description
System.Threading.Tasks.Task<IUserFactor>

The IUserFactor resource

AddFactorAsync(String, AddTokenFactorOptions, CancellationToken)

Enrolls a user with a token factor

Declaration
public Task<IUserFactor> AddFactorAsync(string userId, AddTokenFactorOptions tokenFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId

The user id

AddTokenFactorOptions tokenFactorOptions

The token factor options

System.Threading.CancellationToken cancellationToken

The cancellation token

Returns
Type Description
System.Threading.Tasks.Task<IUserFactor>

The IUserFactor resource

AddFactorAsync(String, AddTotpFactorOptions, CancellationToken)

Enrolls a user with a token:software:totp factor

Declaration
public Task<IUserFactor> AddFactorAsync(string userId, AddTotpFactorOptions totpFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId

The user id

AddTotpFactorOptions totpFactorOptions

The token:software:totp factor options

System.Threading.CancellationToken cancellationToken

The cancellation token

Returns
Type Description
System.Threading.Tasks.Task<IUserFactor>

The IUserFactor resource

DeleteFactorAsync(String, String, CancellationToken)

Unenrolls an existing factor for the specified user, allowing the user to enroll a new factor.

Declaration
public Task DeleteFactorAsync(string userId, string factorId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.String factorId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

EnrollFactorAsync(IUserFactor, String, Nullable<Boolean>, String, Nullable<Int32>, Nullable<Boolean>, CancellationToken)

Enrolls a user with a supported factor.

Declaration
public Task<IUserFactor> EnrollFactorAsync(IUserFactor body, string userId, bool? updatePhone, string templateId = null, int? tokenLifetimeSeconds, bool? activate, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IUserFactor body

The IUserFactor resource.

System.String userId
System.Nullable<System.Boolean> updatePhone
System.String templateId

id of SMS template (only for SMS factor)

System.Nullable<System.Int32> tokenLifetimeSeconds
System.Nullable<System.Boolean> activate
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IUserFactor>

The IUserFactor response.

GetFactorAsync(String, String, CancellationToken)

Fetches a factor for the specified user

Declaration
public Task<IUserFactor> GetFactorAsync(string userId, string factorId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.String factorId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IUserFactor>

The IUserFactor response.

GetFactorTransactionStatusAsync(String, String, String, CancellationToken)

Polls factors verification transaction for status.

Declaration
public Task<IVerifyUserFactorResponse> GetFactorTransactionStatusAsync(string userId, string factorId, string transactionId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.String factorId
System.String transactionId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IVerifyUserFactorResponse>

The IVerifyUserFactorResponse response.

ListFactors(String)

Enumerates all the enrolled factors for the specified user

Declaration
public ICollectionClient<IUserFactor> ListFactors(string userId)
Parameters
Type Name Description
System.String userId
Returns
Type Description
ICollectionClient<IUserFactor>

A collection of IUserFactor that can be enumerated asynchronously.

ListSupportedFactors(String)

Enumerates all the supported factors that can be enrolled for the specified user

Declaration
public ICollectionClient<IUserFactor> ListSupportedFactors(string userId)
Parameters
Type Name Description
System.String userId
Returns
Type Description
ICollectionClient<IUserFactor>

A collection of IUserFactor that can be enumerated asynchronously.

ListSupportedSecurityQuestions(String)

Enumerates all available security questions for a user's question factor

Declaration
public ICollectionClient<ISecurityQuestion> ListSupportedSecurityQuestions(string userId)
Parameters
Type Name Description
System.String userId
Returns
Type Description
ICollectionClient<ISecurityQuestion>

A collection of ISecurityQuestion that can be enumerated asynchronously.

VerifyFactorAsync(IVerifyFactorRequest, String, String, String, Nullable<Int32>, CancellationToken)

Verifies an OTP for a token or token:hardware factor

Declaration
public Task<IVerifyUserFactorResponse> VerifyFactorAsync(IVerifyFactorRequest body, string userId, string factorId, string templateId = null, int? tokenLifetimeSeconds, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IVerifyFactorRequest body

The IVerifyFactorRequest resource.

System.String userId
System.String factorId
System.String templateId
System.Nullable<System.Int32> tokenLifetimeSeconds
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IVerifyUserFactorResponse>

The IVerifyUserFactorResponse response.

VerifyFactorAsync(String, String, String, CancellationToken)

Verifies an OTP for a token or token:hardware factor

Declaration
public Task<IVerifyUserFactorResponse> VerifyFactorAsync(string userId, string factorId, string templateId = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId

The user ID.

System.String factorId

The factor ID.

System.String templateId

The template ID.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IVerifyUserFactorResponse>

The IVerifyUserFactorResponse response.

Implements

IOktaClient
IUserFactorsClient
Back to top Copyright © 2021 Okta, Inc.
Generated with DocFx.