Interface IUserFactorsClient
A client that works with Okta UserFactor resources.
Namespace: Okta.Sdk
Assembly: Okta.Sdk.dll
Syntax
public interface IUserFactorsClient
Methods
ActivateFactorAsync(IActivateFactorRequest, String, String, CancellationToken)
The sms
and token:software:totp
factor types require activation to complete the enrollment process.
Declaration
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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. |