table of contents
| jwt_object_grp(3) | Library Functions Manual | jwt_object_grp(3) |
NAME¶
jwt_object_grp - JWT Functions
SYNOPSIS¶
Data Structures¶
struct jwt_config_t
Structure used to pass state with a user callback.
Typedefs¶
typedef struct jwt jwt_t
Opaque JWT object. typedef int(* jwt_callback_t) (jwt_t *,
jwt_config_t *)
General callback for generation and verification of JWT.
Functions¶
jwt_value_error_t jwt_header_set (jwt_t *jwt,
jwt_value_t *value)
Set a value in the header of a JWT. jwt_value_error_t
jwt_header_get (jwt_t *jwt, jwt_value_t *value)
Get a value from the header of a JWT. jwt_value_error_t
jwt_header_del (jwt_t *jwt, const char *header)
Delete a value from the header of a JWT. jwt_value_error_t
jwt_claim_set (jwt_t *jwt, jwt_value_t *value)
Set a value in the claims of a JWT. jwt_value_error_t
jwt_claim_get (jwt_t *jwt, jwt_value_t *value)
Get a value from the claims of a JWT. jwt_value_error_t
jwt_claim_del (jwt_t *jwt, const char *claim)
Delete a value from the claims of a JWT.
Detailed Description¶
For most usage, setting values in the builder object is enough to provide all the information you would like set in a JWT token. However, if some information is dynamic, meaning it is only known at the time the token is created, then you can provide this during the builder callback on the jwt_t object.
When verifying a token, the checker callback should not modify the jwt_t object at all. Access to the jwt_t is provided only to allow additional validation beyond LibJWT's internal checks.
Typedef Documentation¶
typedef int(* jwt_callback_t) (jwt_t *, jwt_config_t *)¶
General callback for generation and verification of JWT.
typedef struct jwt jwt_t¶
Opaque JWT object. Used in callbacks when generating or verifying a JWT
Function Documentation¶
jwt_value_error_t jwt_claim_del (jwt_t * jwt, const char * claim)¶
Delete a value from the claims of a JWT.
Parameters
claim The name of the claim to delete, or NULL to clear all claims
Returns
jwt_value_error_t jwt_claim_get (jwt_t * jwt, jwt_value_t * value)¶
Get a value from the claims of a JWT.
Parameters
value A jwt_value_t structure with relevant actions filled in
Returns
jwt_value_error_t jwt_claim_set (jwt_t * jwt, jwt_value_t * value)¶
Set a value in the claims of a JWT.
Parameters
value A jwt_value_t structure with relevant actions filled in
Returns
jwt_value_error_t jwt_header_del (jwt_t * jwt, const char * header)¶
Delete a value from the header of a JWT.
Parameters
header The name of the header to delete, or NULL to clear the entire header
Returns
jwt_value_error_t jwt_header_get (jwt_t * jwt, jwt_value_t * value)¶
Get a value from the header of a JWT.
Parameters
value A jwt_value_t structure with relevant actions filled in
Returns
jwt_value_error_t jwt_header_set (jwt_t * jwt, jwt_value_t * value)¶
Set a value in the header of a JWT.
Parameters
value A jwt_value_t structure with relevant actions filled in
Returns
Author¶
Generated automatically by Doxygen for LibJWT from the source code.
| Version 3.2.2 | LibJWT |