Difference between revisions of "The signature generation"
| (8 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
| + | <span data-link_translate_en_title="The signature generation" data-link_translate_en_url="The signature generation"></span>[[:en:The signature generation]][[en:The signature generation]] | ||
| + | <span data-link_translate_he_title="הדור חתימה" data-link_translate_he_url="%D7%94%D7%93%D7%95%D7%A8+%D7%97%D7%AA%D7%99%D7%9E%D7%94"></span>[[:he:הדור חתימה]][[he:הדור חתימה]] | ||
| + | <span data-link_translate_ru_title="Создание подписи" data-link_translate_ru_url="%D0%A1%D0%BE%D0%B7%D0%B4%D0%B0%D0%BD%D0%B8%D0%B5+%D0%BF%D0%BE%D0%B4%D0%BF%D0%B8%D1%81%D0%B8"></span>[[:ru:Создание подписи]][[ru:Создание подписи]] | ||
| + | <span data-link_translate_ja_title="署名の生成" data-link_translate_ja_url="%E7%BD%B2%E5%90%8D%E3%81%AE%E7%94%9F%E6%88%90"></span>[[:ja:署名の生成]][[ja:署名の生成]] | ||
| + | <span data-link_translate_ar_title="توليد التوقيع" data-link_translate_ar_url="%D8%AA%D9%88%D9%84%D9%8A%D8%AF+%D8%A7%D9%84%D8%AA%D9%88%D9%82%D9%8A%D8%B9"></span>[[:ar:توليد التوقيع]][[ar:توليد التوقيع]] | ||
<span data-link_translate_zh_title="签名生成" data-link_translate_zh_url="%E7%AD%BE%E5%90%8D%E7%94%9F%E6%88%90"></span>[[:zh:签名生成]][[zh:签名生成]] | <span data-link_translate_zh_title="签名生成" data-link_translate_zh_url="%E7%AD%BE%E5%90%8D%E7%94%9F%E6%88%90"></span>[[:zh:签名生成]][[zh:签名生成]] | ||
<span data-link_translate_ro_title="Generația semnături" data-link_translate_ro_url="Genera%C8%9Bia+semn%C4%83turi"></span>[[:ro:Generația semnături]][[ro:Generația semnături]] | <span data-link_translate_ro_title="Generația semnături" data-link_translate_ro_url="Genera%C8%9Bia+semn%C4%83turi"></span>[[:ro:Generația semnături]][[ro:Generația semnături]] | ||
| Line 10: | Line 15: | ||
<br /> | <br /> | ||
| − | + | {{#seo: | |
| − | + | |title=The signature generation | |
| − | + | |title_mode=append | |
| − | + | |keywords=these,are,your,keywords | |
| − | + | |description=The signature generation | |
| − | + | |image=Uploaded_file.png | |
| + | |image_alt=Wiki Logo | ||
| + | }} | ||
==Introduction == <!--T:1--> | ==Introduction == <!--T:1--> | ||
During a call to the API, as described in the WIKI of authentication, a signature is required. It is generated '''based on all of the parameters provided during the call '''.<br /> | During a call to the API, as described in the WIKI of authentication, a signature is required. It is generated '''based on all of the parameters provided during the call '''.<br /> | ||
| − | For technical reasons, the authentication | + | For technical reasons and for the moment, the authentication parameters must 'always be transmitted via the HTTP GET method |
==Example == <!--T:2--> | ==Example == <!--T:2--> | ||
| Line 26: | Line 33: | ||
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
// Définition des paramètres | // Définition des paramètres | ||
| − | $data["login"] = "mail@example. | + | $data["login"] = "mail@example.com "; |
$data["password"] = "DH 4=674j_G "; // Mot de passe non chiffré | $data["password"] = "DH 4=674j_G "; // Mot de passe non chiffré | ||
// D"autres paramètres peuvent êtres ajoutés en fonction de l"appel à l"API | // D"autres paramètres peuvent êtres ajoutés en fonction de l"appel à l"API | ||
| Line 58: | Line 65: | ||
==Conclusion == <!--T:4--> | ==Conclusion == <!--T:4--> | ||
| − | Once the signature is generated, it is necessary to pass it as a parameter (In addition to all the other parameters ) the API call.<br /> | + | Once the signature is generated, it is necessary to pass it as a parameter (In addition to all the other parameters ) to the API call.<br /> |
Following the previous example, parameters to pass would have therefore been :<br /> | Following the previous example, parameters to pass would have therefore been :<br /> | ||
* login = "mail@example.cOM " | * login = "mail@example.cOM " | ||
Latest revision as of 04:28, 6 November 2022
en:The signature generation
he:הדור חתימה
ru:Создание подписи
ja:署名の生成
ar:توليد التوقيع
zh:签名生成
ro:Generația semnături
pl:Generowanie podpisu
de:Die Signatur-generation
nl:De handtekening generatie
it:La generazione della firma
pt:A geração de assinatura
es:La generación de una firma
fr:Génération de la signature
Introduction
During a call to the API, as described in the WIKI of authentication, a signature is required. It is generated based on all of the parameters provided during the call .
For technical reasons and for the moment, the authentication parameters must 'always be transmitted via the HTTP GET method
Example
// Définition des paramètres
$data["login"] = "mail@example.com ";
$data["password"] = "DH 4=674j_G "; // Mot de passe non chiffré
// D"autres paramètres peuvent êtres ajoutés en fonction de l"appel à l"API
// $data["autre_parametre"] = "valeur";
// $data["autre_parametre_2"] = "valeur_2";
// $data["..."] = "...";
// Triage des paramètres dans l'ordre croissant
ksort($data);
// Encodage des paramètres
$query = http_build_query($data);
// Encodage des signes plus
$query = str_replace("+", "%20", $query);
// Transformation de la chaîne de caractères en minuscule
$query = strtolower($query);
// Clé publique d'Ikoula (cf. lien ci-dessus)
$public_key="MIIBIjAN...";
// Hashage des paramètres
$hash = hash_hmac("SHA1", $query, $public_key, true);
// Encodage en base64, puis encodage en URL selon RFC 3986
$signature = rawurlencode(base64_encode($hash));
// ==> $signature contient alors la signature finale
Conclusion
Once the signature is generated, it is necessary to pass it as a parameter (In addition to all the other parameters ) to the API call.
Following the previous example, parameters to pass would have therefore been :
- login = "mail@example.cOM "
- password = "DH 4=674j_G "
- signature = $signature
This article seemed you to be useful ?
Enable comment auto-refresher