Interface IMFAControllerApiAsync
Represents a collection of functions to interact with the API endpoints
Inherited Members
Namespace: mailslurp.Api
Assembly: mailslurp.dll
Syntax
public interface IMFAControllerApiAsync : IApiAccessor
Methods
View SourceCreateTotpDeviceForCustomAsync(CreateTotpDeviceOtpAuthUrlOptions, int, CancellationToken)
Create a TOTP device from custom options
Declaration
Task<TotpDeviceDto> CreateTotpDeviceForCustomAsync(CreateTotpDeviceOtpAuthUrlOptions createTotpDeviceOtpAuthUrlOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CreateTotpDeviceOtpAuthUrlOptions | createTotpDeviceOtpAuthUrlOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<TotpDeviceDto> | Task of TotpDeviceDto |
Remarks
Create a virtual TOTP device for custom options specifying all parameters of the TOTP device.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
CreateTotpDeviceForCustomWithHttpInfoAsync(CreateTotpDeviceOtpAuthUrlOptions, int, CancellationToken)
Create a TOTP device from custom options
Declaration
Task<ApiResponse<TotpDeviceDto>> CreateTotpDeviceForCustomWithHttpInfoAsync(CreateTotpDeviceOtpAuthUrlOptions createTotpDeviceOtpAuthUrlOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CreateTotpDeviceOtpAuthUrlOptions | createTotpDeviceOtpAuthUrlOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<TotpDeviceDto>> | Task of ApiResponse (TotpDeviceDto) |
Remarks
Create a virtual TOTP device for custom options specifying all parameters of the TOTP device.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
CreateTotpDeviceForOtpAuthUrlAsync(CreateTotpDeviceOtpAuthUrlOptions, int, CancellationToken)
Create a TOTP device from an OTP Auth URL
Declaration
Task<TotpDeviceDto> CreateTotpDeviceForOtpAuthUrlAsync(CreateTotpDeviceOtpAuthUrlOptions createTotpDeviceOtpAuthUrlOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CreateTotpDeviceOtpAuthUrlOptions | createTotpDeviceOtpAuthUrlOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<TotpDeviceDto> | Task of TotpDeviceDto |
Remarks
Create a virtual TOTP device for a given OTP Auth URL such as otpauth://totp/MyApp:alice@example.com?secret=ABC123&issuer=MyApp&period=30&digits=6&algorithm=SHA1. You can provider overrides in the options for each component of the URL.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
CreateTotpDeviceForOtpAuthUrlWithHttpInfoAsync(CreateTotpDeviceOtpAuthUrlOptions, int, CancellationToken)
Create a TOTP device from an OTP Auth URL
Declaration
Task<ApiResponse<TotpDeviceDto>> CreateTotpDeviceForOtpAuthUrlWithHttpInfoAsync(CreateTotpDeviceOtpAuthUrlOptions createTotpDeviceOtpAuthUrlOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CreateTotpDeviceOtpAuthUrlOptions | createTotpDeviceOtpAuthUrlOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<TotpDeviceDto>> | Task of ApiResponse (TotpDeviceDto) |
Remarks
Create a virtual TOTP device for a given OTP Auth URL such as otpauth://totp/MyApp:alice@example.com?secret=ABC123&issuer=MyApp&period=30&digits=6&algorithm=SHA1. You can provider overrides in the options for each component of the URL.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetTotpDeviceAsync(Guid, int, CancellationToken)
Get a TOTP device by ID
Declaration
Task<TotpDeviceDto> GetTotpDeviceAsync(Guid id, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<TotpDeviceDto> | Task of TotpDeviceDto |
Remarks
Get Time-Based One-Time Password (TOTP) device by its ID.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetTotpDeviceByAsync(string, string, string, int, CancellationToken)
Get a TOTP device by username, issuer, or name. Returns empty if not found.
Declaration
Task<TotpDeviceOptionalDto> GetTotpDeviceByAsync(string name = null, string issuer = null, string username = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | name | Optional name filter (optional) |
string | issuer | Optional issuer filter (optional) |
string | username | Optional username filter (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<TotpDeviceOptionalDto> | Task of TotpDeviceOptionalDto |
Remarks
Get Time-Based One-Time Password (TOTP) device by its username and issuer mapping.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetTotpDeviceByWithHttpInfoAsync(string, string, string, int, CancellationToken)
Get a TOTP device by username, issuer, or name. Returns empty if not found.
Declaration
Task<ApiResponse<TotpDeviceOptionalDto>> GetTotpDeviceByWithHttpInfoAsync(string name = null, string issuer = null, string username = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | name | Optional name filter (optional) |
string | issuer | Optional issuer filter (optional) |
string | username | Optional username filter (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<TotpDeviceOptionalDto>> | Task of ApiResponse (TotpDeviceOptionalDto) |
Remarks
Get Time-Based One-Time Password (TOTP) device by its username and issuer mapping.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetTotpDeviceCodeAsync(Guid, DateTime?, int?, int, CancellationToken)
Get a TOTP device code by device ID
Declaration
Task<TotpDeviceCodeDto> GetTotpDeviceCodeAsync(Guid id, DateTime? at = null, int? minSecondsUntilExpire = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | ID of the TOTP device to get the code for |
DateTime? | at | Optional time to get code for. If not provided, current time is used. (optional) |
int? | minSecondsUntilExpire | Optional minimum time until code expires. Will hold thread open until period reached. (optional, default to 5) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<TotpDeviceCodeDto> | Task of TotpDeviceCodeDto |
Remarks
Get Time-Based One-Time Password for a device by its ID.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetTotpDeviceCodeWithHttpInfoAsync(Guid, DateTime?, int?, int, CancellationToken)
Get a TOTP device code by device ID
Declaration
Task<ApiResponse<TotpDeviceCodeDto>> GetTotpDeviceCodeWithHttpInfoAsync(Guid id, DateTime? at = null, int? minSecondsUntilExpire = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | ID of the TOTP device to get the code for |
DateTime? | at | Optional time to get code for. If not provided, current time is used. (optional) |
int? | minSecondsUntilExpire | Optional minimum time until code expires. Will hold thread open until period reached. (optional, default to 5) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<TotpDeviceCodeDto>> | Task of ApiResponse (TotpDeviceCodeDto) |
Remarks
Get Time-Based One-Time Password for a device by its ID.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetTotpDeviceWithHttpInfoAsync(Guid, int, CancellationToken)
Get a TOTP device by ID
Declaration
Task<ApiResponse<TotpDeviceDto>> GetTotpDeviceWithHttpInfoAsync(Guid id, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<TotpDeviceDto>> | Task of ApiResponse (TotpDeviceDto) |
Remarks
Get Time-Based One-Time Password (TOTP) device by its ID.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |