TfaRequest

Represents a POST request sent through the API to generate a new TFA secret for the current user.

Two Factor Authentication Requests can be used to increase/decrease access security.

TfaRequest Properties

TfaRequest

Field Type Inherited from Description
Action TfaRequestActions TfaRequest Gets or sets the Action value
CurrentPassword String TfaRequest Required to send the Current Password to protect the integrity of the user’s account
OneTimePassword String TfaRequest Gets or sets the OneTimePassword value

JSON Structure of TfaRequest

{
   "Action"	:	"[TfaRequestActions](/object-model/tfarequestactions)",
   "CurrentPassword"	:	"String",
   "OneTimePassword"	:	"String"
}

Enable Tfa Async

Example in C#

// Returns: nothing
await client.EnableTfaAsync(String currentPassword)

Example in CURL



           curl -X POST \
               https://keepapi.feenicshosting.com/api/currentuser/tfa \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -D '{
                       "$type":"Feenics.Keep.WebApi.Model.TfaRequest, Feenics.Keep.WebApi.Model",
                       "CurrentPassword":"CURRENT_PASSWORD_HERE",
                       "OneTimePassword":null,
                       "Action":0
                   }'
            

Get Tfa Secret As Qr Code Image

Example in C#

// Returns: Byte
var item = await client.GetTfaSecretAsQrCodeImage(String currentPassword)

Example in CURL



           curl -X POST \
               https://keepapi.feenicshosting.com/api/currentuser/tfa \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -D '{
                       "$type":"Feenics.Keep.WebApi.Model.TfaRequest, Feenics.Keep.WebApi.Model",
                       "CurrentPassword":"CURRENT_PASSWORD_HERE",
                       "OneTimePassword":null,
                       "Action":2
                   }'
            

Remove Tfa Async

Example in C#

// Returns: nothing
await client.RemoveTfaAsync(String currentPassword)

Example in CURL



           curl -X POST \
               https://keepapi.feenicshosting.com/api/currentuser/tfa \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -D '{
                       "$type":"Feenics.Keep.WebApi.Model.TfaRequest, Feenics.Keep.WebApi.Model",
                       "CurrentPassword":"CURRENT_PASSWORD_HERE",
                       "OneTimePassword":null,
                       "Action":1
                   }'
            

Verify Tfa Code

Example in C#

// Returns: Boolean
var item = await client.VerifyTfaCode(String onetimePassword)

Example in CURL



           curl -X POST \
               https://keepapi.feenicshosting.com/api/currentuser/tfa \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -D '{
                       "$type":"Feenics.Keep.WebApi.Model.TfaRequest, Feenics.Keep.WebApi.Model",
                       "CurrentPassword":"CURRENT_PASSWORD_HERE",
                       "OneTimePassword":null,
                       "Action":4
                   }'