l8w8jwt_claim

Struct containing a jwt claim key-value pair.<p> If allocated on the heap by the decode function, remember to call <code>l8w8jwt_claims_free()</code> on it once you're done using it.

extern (C) nothrow @nogc
struct l8w8jwt_claim {}

Members

Variables

key
char* key;

The token claim key (e.g. "iss", "iat", "sub", etc...). <p> NUL-terminated C-string!

key_length
size_t key_length;

key string length. <p> Set this to <code>0</code> if you want to make the encoder use <code>strlen(key)</code> instead.

type
int type;

The type of the claim's value. <p> 0 = string, 1 = integer, 2 = number, 3 = boolean, 4 = null, 5 = array, 6 = object, 7 = other. @see https://www.w3schools.com/js/js_json_datatypes.asp

value
char* value;

The claim's value as a NUL-terminated C-string.

value_length
size_t value_length;

value string length. <p> Set this to <code>0</code> if you want to make the encoder use <code>strlen(value)</code> instead.

Meta