TuCloudAPI authchallenge
TuCloudAPI function to manage FuturePBX (the cloud PBX). Available to: SuperRoot, Operator, Client.
Description
A proof-of-work captcha challenge (ALTCHA protocol, SHA-256). PUBLIC. The browser finds the number in [0, maxnumber] such that sha256_hex(salt + number) = challenge, then sends base64(JSON {algorithm, challenge, number, salt, signature}) as `captcha` to authlogin or authrequest. A challenge lives 5 minutes (the expiry is inside the salt, signed) and is accepted once. Per IP 60 per window.
Call
https://tucloudapi.7kas.com:9087/tucloud?func=authchallenge&ukey=YOUR_KEY
GET, or POST with the parameters form-urlencoded in the body. Requires the ukey parameter.
Parameters
None beyond ukey and func=authchallenge.
Example
https://tucloudapi.7kas.com:9087/tucloud?func=authchallenge
Response
{ok, algorithm:"SHA-256", challenge (64 hex), maxnumber, salt ("<32 hex>?expires=<unix>"), signature (64 hex)}.
Back to TuCloudAPI