GET ./auth/tfa_options
Tags: public
It is used to return a list with options for two factor authentication.
The request can be made in 2 ways:
- with username and password
- with uaID and access token
It should be used with the username and the password at authentication and with uaID and the token to get the list with active options at configuration.
when the request is made with uaID and token the response can have more information and the phone number will be visible.
Caution!! Even if the method is GET the request can be made also with POST but the field _method will be include and will have the value GET. We do this in order not to send the password through GET and risking its exposure, for example, in logs.
Parameter tfaOptType can have the following value:
- 1 = SMS
- 3 = TOTP
GET parameter
Name | Value Type | Validation | Details |
---|---|---|---|
_method | string | Optional | values[GET]; Override the method. |
uaUserName | string | Required | Username. Mandatory for the first method(username and password). |
uaPassword | string | Required | Password. Mandatory for the first method(username and password). |
uaID | int | Required | User ID. Mandatory for the second method(uaID and token). |
Validation
Error Field | Error Code | Error Message |
---|---|---|
uaID | 101 | Invalid uaID. |
uaUserName | 102 | Invalid username. |
uaPassword | 103 | Invalid password. |
Output example for the first method (username/password)
{"meta": {"countTotal": "2","countData": "2","countOffset": "0"},"data": [{"tfaOptID": "1","tfaOptType": "1","tfaOptHint": "+4********02"},{"tfaOptID": "3","tfaOptType": "3","tfaOptHint": null}]}
Output example for the second method (uaid/token)
{"meta": {"countTotal": "2","countData": "2","countOffset": "0"},"data": [{"tfaOptID": "1","tfaOptType": "1","tfaOptInsertDate": "2020-08-14 17:04:03","tfaOptLastUsed": "2020-08-14 17:04:03","tfaOptHint": "+40768248202"},{"tfaOptID": "3","tfaOptType": "3","tfaOptInsertDate": "2020-08-14 18:27:11","tfaOptLastUsed": "2020-08-14 17:04:03","tfaOptHint": null}]}