Discussions
Authentication_key: Public
Salve, sto provando a testare l'autenticazione tramite una chiamata API a "https://staging.authservices.satispay.com/wally-services/protocol/tests/signature", ma continua a restituire role: public.
Ho ricontrollato sia il Digest che la Signature e non mi sembra ci siano errori.
Il curl della mia chiamata è il seguente:
curl --location --request POST 'https://staging.authservices.satispay.com/wally-services/protocol/tests/signature'
--header 'Content-Type: application/json'
--header 'Host: staging.authservices.satispay.com'
--header 'Date: Mon, 18 Mar 2019 15:10:24 +0000'
--header 'Digest: ZML76UQPYzw5yDTmhySnU1S8nmqGde/jhqOG5rpfVSI='
--header 'Authorization: Signature keyId="mf9elddi1uf516blfr89g26h7agssos2d97hdrf0qp78oc5k78glr91238dujfj8vc2ou1ft0vfnanu14c3n868mujacv6i0cr44s1im42mfcg2n51hsp491o7dvfj2v7jelqn6mrnu7bpfoj7oamupku3r6ar92tnnuo47v51ikm8lhrap09l5p34b1igu6b2rpqpa7", algorithm="rsa-sha256", headers="(request-target) host date digest", signature="G96zyIIJtgF57ukTRR9umqHWqQsZdJux4Af7Ab5ScvGanDERmTsqn7cVzBcthlSA43AD4os3eUWEZgZlgSCZosfIXX3M2WeZrGcN40FzptL8GiWbYEu36BejvHleus6hngcP/ZewVXRShQoXhKSTpKDrP2zTlRfYnlicDyP+PGjfQfLR1BzvvjY/WyonLcAnzgO9oiODOiOM5iMU7J5/s0w1q77Zm/SUL9EphAq11oG5Lgp+rgYVRqQ/dT3oyNgTtSLEX1InOvQvUd7X/Cd9ebk7cxCrYg3xtsskLxX2EXGEIfsuyek0R6ndv61J4BkNh1sWIuLbGIS4rOk+Fhb7Io6VGdLzqFca+xLOpNtQovKCcXPPiFmpdAaRaOw8NguW95CNT7H7m/uK8aIx0LbDQ9uJF7414dQGYmQjhT/uWMYlZqb2gsfXoZd+0ahHLJqUzeLXgDlS6DUsiVqY2cehOnkO8KLovDVpPWg19JNdh3slBsX/itU1hfWSYeaQUSIdik0Be+TnuwQDM7r0Dk8ARUtjo+KZMdor/UVAwZvLynJAEaRYB/PiLStvf122UdrWMegaw+v8Q1MQlio5NHqWKDNxdSp8u41nm08AlOYeOXMHUmpGUEqtBi5sXdE2le5ftClzMJuOlmulCXRvykGC8Xm8yzMjYoo7C0DSCoFyn1c="'
--data-raw '{
"flow": "MATCH_CODE",
"amount_unit": 100,
"currency": "EUR"
}'
e la risposta è:
{
"authentication_key": {
"role": "PUBLIC"
},
"signature": {
"key_id": "mf9elddi1uf516blfr89g26h7agssos2d97hdrf0qp78oc5k78glr91238dujfj8vc2ou1ft0vfnanu14c3n868mujacv6i0cr44s1im42mfcg2n51hsp491o7dvfj2v7jelqn6mrnu7bpfoj7oamupku3r6ar92tnnuo47v51ikm8lhrap09l5p34b1igu6b2rpqpa7",
"algorithm": "RSA_SHA256",
"headers": [
"(request-target)",
"host",
"date",
"digest"
],
"signature": "G96zyIIJtgF57ukTRR9umqHWqQsZdJux4Af7Ab5ScvGanDERmTsqn7cVzBcthlSA43AD4os3eUWEZgZlgSCZosfIXX3M2WeZrGcN40FzptL8GiWbYEu36BejvHleus6hngcP/ZewVXRShQoXhKSTpKDrP2zTlRfYnlicDyP+PGjfQfLR1BzvvjY/WyonLcAnzgO9oiODOiOM5iMU7J5/s0w1q77Zm/SUL9EphAq11oG5Lgp+rgYVRqQ/dT3oyNgTtSLEX1InOvQvUd7X/Cd9ebk7cxCrYg3xtsskLxX2EXGEIfsuyek0R6ndv61J4BkNh1sWIuLbGIS4rOk+Fhb7Io6VGdLzqFca+xLOpNtQovKCcXPPiFmpdAaRaOw8NguW95CNT7H7m/uK8aIx0LbDQ9uJF7414dQGYmQjhT/uWMYlZqb2gsfXoZd+0ahHLJqUzeLXgDlS6DUsiVqY2cehOnkO8KLovDVpPWg19JNdh3slBsX/itU1hfWSYeaQUSIdik0Be+TnuwQDM7r0Dk8ARUtjo+KZMdor/UVAwZvLynJAEaRYB/PiLStvf122UdrWMegaw+v8Q1MQlio5NHqWKDNxdSp8u41nm08AlOYeOXMHUmpGUEqtBi5sXdE2le5ftClzMJuOlmulCXRvykGC8Xm8yzMjYoo7C0DSCoFyn1c=",
"resign_required": false,
"iteration_count": 2617,
"valid": true
},
"signed_string": "(request-target): post /wally-services/protocol/tests/signature\nhost: staging.authservices.satispay.com\ndate: Mon, 18 Mar 2019 15:10:24 +0000\ndigest: ZML76UQPYzw5yDTmhySnU1S8nmqGde/jhqOG5rpfVSI="
}
Una cosa strana che ho notato è che nella risposta rimuove dal digest (sulla proprietà signed_string) la parte "SHA-256="