/Legal/ReadyForApproval
When an ID application is ready (all attachments have been signed and uploaded), the client can call this resource to flag the application as ready for approval. This will execute any automated onboarding procedures to analyze the application, and, if passing them, will take the identity to the approved state. They can also take the application to the rejected state, in case they find the information invalid.
JSON
- Request
{ "keyId": Required(Str(PKeyId)), "legalId": Required(Str(PLegalId)), "nonce": Required(Str(PNonce)), "keySignature": Required(Str(PKeySignature)), "requestSignature": Required(Str(PRequestSignature)) }
- Response (if successful)
{ "Identity": Required(PIdentity) }
XML
- Request
<ReadyForApproval xmlns="https://waher.se/Schema/BrokerAgent.xsd" keyId=(Required(Str(PKeyId))) legalId=(Required(Str(PLegalId))) nonce=(Required(Str(PNonce))) keySignature=(Required(Str(PKeySignature))) requestSignature=(Required(Str(PRequestSignature)))/>
- Response (if successful)
<IdentityResponse xmlns="https://waher.se/Schema/BrokerAgent.xsd"> <[Required(PIdentity)]> </IdentityResponse>
Input Parameters
Parameter | Description |
---|---|
PKeyId |
Identity of key to use for signing the Identity application. |
PLegalId |
Identity of the Legal Identity to flag as ready for approval. |
PNonce |
A unique random string, at least 32 characters long, with sufficient entropy to not be reused again. If reused, an error will be returned. |
PKeySignature |
Cryptographic signature of the key ID, using the key password. |
PRequestSignature |
Cryptographic signature of the requesut, using the account password. |
Response Parameters
Parameter | Description |
---|---|
PIdentity |
Updated Identity object generated by the server. |
Calculating the Key Signature
The signature in PKeySignature
is calculated as follows.
Concatenate the strings
PUserName ":" Host ":" PLocalName ":" PNamespace ":" PKeyId
and call its1
, whereHost
is the host/domain name of the server. It is taken from the HTTPHost
request header, so it must be the same as is used in the URL of the request.PUserName
is the name of the account, used when creating the current account or logging in to the current account.PLocalName
andPNamespace
are the local name and namespace corresponding to the algorithm used for the key.UTF-8 encode the secret corresponding to the key, and call it
Key1
.UTF-8 encode the string
s1
, and call itData1
.Calculate the HMAC-SHA256 signature using
Key1
andData1
, and call itH1
.Base64-encode
H1
. The result is the key signature of the request.
Calculating the Request Signature
The signature in PRequestSignature
is calculated as follows.
Concatenate the strings
s1 ":" PKeySignature ":" PNonce ":" PLegalId
, and call its2
.s1
is the intermediate result of computing the key signature in the previous step.UTF-8 encode the secret corresponding to the account, and call it
Key2
.UTF-8 encode the string
s2
, and call itData2
.Calculate the HMAC-SHA256 signature using
Key2
andData2
, and call itH2
.Base64-encode
H2
. The result is the signature of the request.
Javascript Library
Use the following asynchronous method in the Javascript Library, to call this resource.
var Response = await AgentAPI.Legal.ReadyForApproval(LocalName, Namespace, KeyId, KeyPassword, AccountPassword, LegalId);