Challenge request
The APP can request the PKSA to sign a challenge.
Before sending its request, the APP must create a "challenge request data" object (challenge_req_data
) it will send to the PKSA
The structure of the challenge_req_data
is:
challenge_req_data
key_type
: the key type required to sign the transactions. It can be one ofposting
|active
|memo
.challenge
: a string to be encrypted or decrypteddecrypt: (optional - default value is false) indicates if the passed
challenge
must be encrypted (decrypt=false) or decrypted (decrypt=true) before being returned by the PKSAnonce
: current UNIX time in ms (Date.now()
in JavaScript). If a transaction request ever fails, do NOT reuse thechallenge_req_data
object before first updating the nonce!
The APP must then encrypt the challenge_req_data
object using the encryption key previously shared with the PKSA (auth_key
). By encrypting the sign_data
object, the HAS will be unaware of what's going on between the app and the PKSA and unable to tamper with the challenge request process.
Finally, the APP sends its request to the HAS using the following message:
challenge_req
account
: the Hive account namedata
: the Base64 representation of an encryptedchallenge_req_data
objecttoken
: the authentication token - DEPRECATED since protocol V1
The HAS will reply with a challenge_wait
message:
challenge_wait
uuid
: a unique identifier given by the HAS to the requestexpire
: UNIX timestamp when the request will expire
Last updated