When getting a value, you must set type and name. On a successful return, the the value specific to the type will be filled in. Common error responses for this function are JWT_VALUE_ERR_NOEXIST when the name does not exist, and JWT_VALUE_ERR_TYPE, when the named object is not of the type you requested (e.g. you requested a string, but it's an integer value).
- Note
- Normally JSON is retrieved in compact form. If you set jwt_value_t.pretty, then you will get a tabbed format suitable for human viewing. This must be set after calling jwt_set_GET_JSON().
jwt_value_error_t jwt_builder_claim_get(jwt_builder_t *builder, jwt_value_t *value)
Get a claim from a builder object.
jwt_value_error_t
Error values for header and claim requests.
Definition jwt.h:168
@ JWT_VALUE_ERR_NONE
Definition jwt.h:169
#define jwt_set_GET_INT(__v, __n)
Setup a jwt_value_t to get an integer value.
Definition jwt.h:694
Data type for get and set actions for JWT headers and claims.
Definition jwt.h:187
jwt_long_t int_val
Definition jwt.h:191