TalaoDAO / AltMe

Talao / Altme wallet : Open source Self Sovereign Identity wallet. Multi ecosystem support : EBSI conformant. ARF EUDI wallet implementation, DIIP and more.
https://talao.io
Apache License 2.0
42 stars 13 forks source link

Over13 and Over18 vc by Artificial Intelligence #961

Closed ThierryThevenet closed 1 year ago

ThierryThevenet commented 1 year ago

POST API to URL = https://issuer.talao.co/ai/over13 or https://issuer.talao.co/ai/over18

headers["accept"] = "application/json" headers["Content-Type"] = "application/json" headers['X-API-KEY'] = "5f691f41-b7ef-456e-b53d-7351b2798b4e"

Data to send = { "base64_encoded_string" : base64_encoded_string, "vp" : did_authn, "did" : DID } base64_encoded_string is a base64 encoding of the image file (selfie) as string (not bytes) did_auth is didkit.did_auth with challenge = sha256 (encoded_string).hex() -> it must be a hex string DID is the DID of the wallet

return code is 400 if not correctly formatted data or wrong API key or wrong vp signature or not supported image file return code is 200 if ok, return is the credential as a json return code is 403 if age is undezr 13 or 18

There are several image file constraints : https://developers.yoti.com/v8.0/age-estimation/antispoofing all those issues are in the error message of the 400 return code

png, jpeg, jpg files are accepted with width <2000 px, total pix < 2100000 and see other constraints about te size of the face in te image?

One biometric check is enough just before the selfie, with a limited time of about 10s for the process. If a Dart package to make the selfie with a circle to get the face inside exist that would be great to avoid the "FACE BOX TOO SMALL" error.

credential manifest is the same as current over18/over13

this option must replace the KYC for those 2 credentials

ThierryThevenet commented 1 year ago

example of error message

connexion refused 400 {'error': 'invalid_request', 'error_description': '{"error_message": "The face in image provided is too small.", "error_code": "FACE_BOX_TOO_SMALL"}'} connexion refused 400 {'error': 'invalid_request', 'error_description': '{"error_message": "The face in image provided is too small.", "error_code": "FACE_BOX_TOO_SMALL"}'} connexion refused 400 {'error': 'invalid_request', 'error_description': '{"error_message": "Face not found.", "error_code": "FACE_NOT_FOUND"}'} connexion refused 400 {'error': 'invalid_request', 'error_description': '{"error_message": "Face not found.", "error_code": "FACE_NOT_FOUND"}'} connexion refused 403 {'error': 'invalid_over18', 'error_description': 'User is estimated under 18'}

hawkbee1 commented 1 year ago

Size: XL