• CMP Api

    • CMP
    • Introduction
    • Flow
    • General
    • Generating the signature
    • Response verification signature
    • Apis
  • CMP Api

    • CMP
    • Introduction
    • Flow
    • General
    • Generating the signature
    • Response verification signature
    • Apis
  • CMP Api

    • CMP
    • Introduction
    • Flow
    • General
    • Generating the signature
    • Response verification signature
    • Apis

Response verification signature

Description

This document mainly describes the verification of the and discovery values of the response body after the request is returned.

Response Header

A normal request response header returns the fields necessary to validate the signature:

NameDescription
X-HMAC-SIGNATUREThis is the signature calculated by the API gateway according to the parameters of the Response header. The request receiver needs to recalculate the signature according to the url of the request and response header. If the signature is consistent, the response verification passes.
X-HMAC-ALGORITHMhmac-sha256 fixed value (Be consistent with the request header)
X-HMAC-ACCESS-KEYBe consistent with the request header
X-HMAC-SIGNED-HEADERSBe consistent with the request header
Accept-Languageen-US fixed value (Be consistent with the request header)
Content-Typeapplication/json fixed value (Be consistent with the request header)

Example:

X-HMAC-SIGNATURE: M8w5ai017BnWLoUFjbR2zaqapxj1gXK+Unll6twlDmg=
X-HMAC-ALGORITHM: hmac-sha256
X-HMAC-ACCESS-KEY: user-key
X-HMAC-SIGNED-HEADERS: Accept-Language;Content-Type
Accept-Language: en-US
Content-Type: application/json

Check signature

Using the response header information, the signature is recalculated according to the Generating the signature document. If the calculated signature is the same as the value of X-HMAC-SIGNATURE in the response header, the authentication succeeds

Edit this page on GitHub
Prev
Generating the signature
Next
Apis