LibJWT Dev
The C JSON Web Token Library +JWK +JWKS
|
Data Structures | |
struct | jwt_config_t |
Structure used to manage configuration state. More... | |
Macros | |
#define | JWT_CONFIG_DECLARE(__name) |
Decleration of a jwt_config_t. | |
Typedefs | |
typedef int(* | jwt_callback_t) (const jwt_t *, jwt_config_t *) |
Callback for operations involving verification of tokens. | |
Functions | |
void | jwt_config_init (jwt_config_t *config) |
Intialize jwt_config_t to a clean state. | |
The JWT configuration tools are setup to allow an agnostic way to handle state between different functions. The specific uses of the tools varies according to whether you are providing or consuming tokens. These aspects are documented in the other sections.
This section is a light intro of config types and common usage.
#define JWT_CONFIG_DECLARE | ( | __name | ) |
Decleration of a jwt_config_t.
This is useful for scoped usage to avoid declaring it and running the jwt_config_init function.
typedef int(* jwt_callback_t) (const jwt_t *, jwt_config_t *) |
Callback for operations involving verification of tokens.
Further details can be found in Token Verification, specifically for jwt_verify_wcb
void jwt_config_init | ( | jwt_config_t * | config | ) |
Intialize jwt_config_t to a clean state.
To ensure a jwt_config_t is at a known state, this will clear values in the config. It will not free memory that might be associated with internal pointers.
config | Pointer to config to be cleared |