MILK API authentication tokens are JSON Web Tokens (JWT), which are signed with a JSON Web Signature (JWS)

Basics

A signed JWT is a URL-safe string. The basic format consists of 3 parts, separated by dots as below:

{Base64 encoded JWT Header}.{Base64 encoded JWT Claims}.{Base64 encoded JWT Signature}

These 3 components are as follows:

  1. Header - specifies the format and signing
  2. Claims - specifies who issued the token, who should accept it, and the subject of the claims
  3. Signature - Signature of the encoded header, joining '.' and the encoded claims, using the algorithm specified in the header.