Complete Second Factor Authentication
Dependerá del tipo de autenticación solicitado en Login using Second Factor Authentication si se requiere de este segundo endpoint.
Los tipos de autenticación que utilizan este endpoint son:
- SMS
Endpoint
Headers
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | |
| Authorization | Bearer {{access_token}} | access_token obtained in Atenea |
Url
Method: POST
URL: https://cerberus.trust.lat/v1/authentications/:verification_id/verifications
caution
Recuerda que para utilizar este endpoint es necesario un access token obtenido en el servicio Atenea
Body
{
"totp": "5764"
}
Code Examples
- Curl
- JavaScript
- Python
curl --location --request POST 'cerberus.trust.lat/v1/authentications/jmww/verifications' \
--data-raw '{
"totp": "9717"
}'
import requests
url = "cerberus.trust.lat/v1/authentications/jmww/verifications"
payload = "{\n \"totp\": \"9717\"\n}"
headers = {}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var axios = require('axios');
var data = '{\n "totp": "9717"\n}';
var config = {
method: 'post',
url: 'cerberus.trust.lat/v1/authentications/jmww/verifications',
headers: { },
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Responses
HTTP Code: 200 Found
Esta respuesta indicará que se requiere completar un segundo paso.
{
"code": 200,
"resource": "Verification",
"data": {
"created_at": "2022-02-22T18:46:21.879Z",
"status": "done",
"uid": "jmww",
"updated_at": "2022-02-22T18:47:04.915Z"
},
"message": "Ok"
}
HTTP Code: 404 Not Found
{
"code": 404,
"resource": "Verification",
"message": "Not found"
}
HTTP Code: 422 Not Found
{
"code": 422,
"resource": "Verification",
"message": "Fail",
"errors": "An error ocurred"
}