License API
License API Authorization

Request Signature

6min

Overview

Requests sent to the server have to be digitally signed for purposes of authentication. The signature uses the Date header and signing algorithm used in License API Authorization.

Signature Structure

The signature in the Authorization header is a Base64-encoded HMAC-hashed value of the signing string, which is composed of:

  1. A constant string: licenseSpring
  2. A newline character \n
  3. The value of the Date header being sent in the request (see License API Authorization for more details). This is a date string in RFC7231 format

This signing string is then hashed with the customer's key (shared key) using the algorithm provided in the Authorization header (e.g. HMAC-SHA256). The resulting hash is then encoded in Base64.

Example of Signature Generation

The following is an example of how to generate a signature. First, let's assume the following values:

  • Your company's shared key is kw4qSnpSwXzgiv5yxYpZZmFEd9QAeiKTQ6OuyMja
  • The Date header you set in the request is Tue, 07 Jun 2011 20:51:35 GMT
  • We'll use the default hashing algorithm, HMAC-SHA256

Now we can generate the signature:

1. Create the signing string:

Text


2. Hash the signing string using HMAC-SHA256

3. Encode the hashed value with Base64: UDysfR6MndUZReo07Y9r+vErn8vSxrnQ5ulit18iJ/Q=

The resulting string is then inserted into the Authorization header as the "signature" parameter:

Text


Sample Code

Generating a signature

JS
Python


Generating full HTTP request headers with SDK Demo keys

JS
Python


Full sample code for checking a license key with SDK Demo keys

JS
Python