Autenticações
Um processo de autenticação pode abranger todas as validações realizadas de acordo com a política estabelecida quando o SDK foi inicializado. Essas validações e suas análises podem incluir dados sobre os contextos nos quais o usuário estava situado no momento da solicitação. Em seguida, com base na política definida e nas regras de validação, o status da autenticação é determinado.
Todas as chamadas à API são autenticadas e devem ter o token ao lado do Bearer prefixo no Authorization cabeçalho da requisição. Chamadas com um token de acesso ausente ou inválido retornarão o código de status 401 ("Não autorizado").
O token usado para fazer solicitações à API é o token de acesso gerado de acordo com estas instruções..
Get a authentication attempt based on the provided attempt ID.
Authentication attempt ID
xxxxxxf41e2fcd832e6xxxxxIdentity Authorization Token
Bearer your_token_hereSuccess
Unique identifier of the request.
xxxxx-cecd-4643-95c7-xxxxxIdentifier of authentication attempt.
xxxxyheu899xxxxCreation date of the record.
2024-04-04T13:45:24.321ZStatus of the operation.
approvedValores possíveis: Result of the context analysis.
INVALIDValores possíveis: Source IP of the request.
127.0.0.1 | 2804:d0c:123:xxx:yyy:aaa:321Bad Request
Unauthorized
Resource not found
Internal server error
GET /authentications/{attemptId} HTTP/1.1
Host: api.identity.combateafraude.com
Authorization: text
Accept: */*
{
"requestId": "xxxxx-cecd-4643-95c7-xxxxx",
"id": "xxxxyheu899xxxx",
"identity": {
"id": "xxxxyheu899xxxx",
"name": "John Doe",
"personId": "000111222",
"createdAt": "2024-01-01T13:45:24.321Z"
},
"policy": {
"id": "xxxxyheu899xxxx",
"name": "test",
"policyId": "test",
"createdAt": "2024-01-01T13:45:24.321Z"
},
"createdAt": "2024-04-04T13:45:24.321Z",
"status": "approved",
"context": {
"device": {
"info": {
"userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36",
"browser": {
"name": "Chrome",
"version": "127.x.x",
"major": "127"
},
"engine": {
"name": "Blink",
"version": "127.x.x"
},
"os": {
"name": "Linux",
"version": "x86_64"
},
"device": {
"vendor": "text",
"model": "text",
"type": "text"
},
"cpu": {
"architecture": "amd64"
},
"timezoneFromDevice": "America/Sao_Paulo"
},
"fingerPrint": "ASDiknh123",
"providedInfo": {
"manufacturer": "Apple",
"model": "iPhone 12",
"operatingSystem": "IOS",
"platform": "text"
},
"createdAt": "2024-01-01T13:45:24.321Z",
"type": "web"
},
"location": {
"reverseGeolocation": {
"formattedAddress": "R. John doe, 221b - alfa, John - SP, 98811-xxx, Brazil",
"streetName": "Rua John doe",
"streetNumber": "221b",
"neighborhood": "alfa",
"city": "John",
"region": "São Paulo",
"regionCode": "SP",
"country": "Brazil",
"countryCode": "BR",
"zipcode": "98811-xxx"
},
"location": {
"type": "Point",
"coordinates": [
-23.560009318584633,
-46.63763122201826
],
"accuracy": "12.45",
"usedMethod": "GPS"
}
},
"network": {
"ip": "127.0.0.1",
"asCode": 123412,
"asName": "Net telecom",
"isVpn": true,
"location": {
"city": "São Paulo",
"region": "São Paulo",
"regionCode": "SP",
"country": "Brazil",
"countryCode": "BR"
},
"timezoneFromIp": "America/Sao_Paulo"
}
},
"contextAnalysisResult": "INVALID",
"authenticationMethods": {
"face_authentication": {
"status": "approved",
"attempts": [
{
"refusalReason": "person_not_alive",
"providedFace": {
"signedUrl": "text"
},
"expectedFace": {
"signedUrl": "text"
},
"faceMatch": {
"isMatch": true,
"similarity": "0.99814697265625"
},
"liveness": {
"isAlive": true
},
"createdAt": "2024-01-01T13:45:24.321Z"
}
]
},
"email_authentication": {
"status": "approved",
"attempts": [
{
"refusalReason": "expired_code",
"expectedCode": "12345678",
"providedCode": "12345678",
"sentTo": "text",
"createdAt": "2024-01-01T13:45:24.321Z"
}
],
"createdAt": "2024-01-01T13:45:24.321Z"
},
"sms_authentication": {
"status": "approved",
"attempts": [
{
"refusalReason": "expired_code",
"expectedCode": "12345678",
"providedCode": "12345678",
"sentTo": "text",
"createdAt": "2024-01-01T13:45:24.321Z"
}
],
"createdAt": "2024-01-01T13:45:24.321Z"
}
},
"sourceIp": "127.0.0.1 | 2804:d0c:123:xxx:yyy:aaa:321",
"contextEvaluation": {
"device_context": {
"status": "reproved",
"reason": "MAX_ATTEMPTS_PER_IDENTITY"
},
"location_context": {
"status": "reproved",
"reason": "MAX_ATTEMPTS_PER_IDENTITY"
},
"network_context": {
"status": "reproved",
"reason": "MAX_ATTEMPTS_PER_IDENTITY"
}
}
}Atualizado

