The JWT Hashing algorithm used by the LHost API is HMAC SHA256.
The JWT will be constructed using the following data you should have been provided with:
clientId,clientKey,serverKey.A request JWT will have the following structure:
{
"alg": "HS256",
"typ": "JWT"
}
{
"sub": "<clientId>",
"clientKey": "<clientKey>"
}
The signature will be created using the serverKey as the secret.
For instructions on how to create the JWT please see the official documentation
There are JWT libraries for Token signing/verification available for a multitude of programming and scripting languages:
.NET, Python, Node.js, Java, JavaScript, Perl, Ruby, Elixir, Erlang, Go, Groovy, Haskell, Haxe, Rust, Lua, Scala, D, Clojure, Objective-C, Swift, C, C++, kdb+/Q, Delphi, PHP, Crystal, 1C, PostgreSQL.
Please see https://jwt.io/ for more information.
You can also use the Official JWT Debugger to decode, verify, and generate JWTs.
The JWT should be sent via a “Bearer” Authorization HTTP Header, like so:
Authorization: Bearer <JWT>