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_data
) it will send to the PKSAThe structure of the
challenge_data
is:{
key_type: string,
challenge: string
}
Properties
key_type
: the key type required to sign the transactions. It can be one ofposting
|active
|memo
.challenge
: a string to be signed
The APP must then encrypt the
challenge_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:
{
cmd: "challenge_req",
account: string,
token: string,
data: string
}
Properties
account
: the Hive account nametoken
: the authentication tokendata
: the Base64 representation of an encryptedchallenge_data
object
The HAS will reply with a
challenge_wait
message:{
cmd: "challenge_wait",
uuid: string,
expire: number
}
Properties
uuid
: a unique identifier given by the HAS to the requestexpire
: UNIX timestamp when the request will expire
Last modified 1yr ago