OPTIONAL Array of additional claims to include in the JWT's header like for example "kid" or "cty"; pass <code>NULL</code> if you don't wish to add any! <p> Avoid header claims such as <code>typ</code> and <code>alg</code>, since those are written by the encoding function itself. @see https://tools.ietf.org/html/rfc7519#section-4.1.7
OPTIONAL The additional_header_claims array size; pass <code>0</code> if you don't wish to include any custom claims!
OPTIONAL Array of additional claims to include in the JWT's payload; pass <code>NULL</code> if you don't wish to add any! <p> Registered claim names such as "iss", "exp", etc... have their own dedicated field within this struct: do not include those in this array to prevent uncomfortable duplicates! @see https://tools.ietf.org/html/rfc7519#section-4
OPTIONAL The additional_payload_claims array size; pass <code>0</code> if you don't wish to include any custom claims!
The signature algorithm ID. <p> [0;2] = HS256/384/512 | [3;5] = RS256/384/512 | [6;8] = PS256/384/512 | [9;11] = ES256/384/512
OPTIONAL The audience claim (who is the JWT intended for? Who is the intended JWT's recipient?). Set this to <code>NULL</code> if you don't wish to add this claim to the token. @see https://tools.ietf.org/html/rfc7519#section-4.1.3
aud claim string length.
Expiration time claim; specifies when this token should stop being valid (in seconds since Unix epoch). <p> If you want to omit this, set this to <code>0</code>, but do NOT FORGET to set it to something, otherwise it will be set to whatever random value was in the memory where this variable resides. @see https://tools.ietf.org/html/rfc7519#section-4.1.4
"Issued at" timestamp claim; specifies when this token was emitted (in seconds since Unix epoch). <p> If you want to omit this, set this to <code>0</code>, but do NOT FORGET to set it to something, otherwise it will be set to whatever random value was in the memory where this variable resides. @see https://tools.ietf.org/html/rfc7519#section-4.1.6
OPTIONAL The issuer claim (who issued the JWT?). Can be omitted by setting this to <code>NULL</code>. @see https://tools.ietf.org/html/rfc7519#section-4.1.1
iss claim string length.
OPTIONAL The JWT ID. Provides a unique identifier for the token. Can be omitted by setting this to <code>NULL</code>. @see https://tools.ietf.org/html/rfc7519#section-4.1.7
jti claim string length.
"Not before" time claim; specifies when this token should start being valid (in seconds since Unix epoch). <p> If you want to omit this, set this to <code>0</code>, but do NOT FORGET to set it to something, otherwise it will be set to whatever random value was in the memory where this variable resides. @see https://tools.ietf.org/html/rfc7519#section-4.1.5
Where the encoded token should be written into (will be malloc'ed, so make sure to <code>l8w8jwt_free()</code> this as soon as you're done using it!).
Where the output token string length should be written into.
The secret key to use for signing the token (e.g. if you chose HS256 as algorithm, this will be the HMAC secret; for RS512 this will be the private PEM-formatted RSA key string, and so on...).
Length of the secret_key
If the secret key requires a password for usage, please assign it to this field. <p> You can only omit this when using JWT algorithms "HS256", "HS384" or "HS512" (it's ignored in that case actually). <p> Every other algorithm requires you to at least set this to <code>NULL</code> if the {@link #secret_key} isn't password-protected.
The secret key's password length (if there is any). If there's none, set this to zero!
OPTIONAL The subject claim (who is the JWT about?). Set to <code>NULL</code> if you don't want it in your token. @see https://tools.ietf.org/html/rfc7519#section-4.1.2
sub claim string length.
Struct containing the parameters to use for creating a JWT with l8w8jwt.