Creates a new grant for this object. The string for grant
is copied internally, so do not require that the pointer or string
remain valid for the lifetime of this object. It is an error if you
try to add a grant that already exists.
@param jwt Pointer to a JWT object.
@param grant String containing the name of the grant to add.
@param val int containing the value to be saved for grant.
@return Returns 0 on success, valid errno otherwise.
Note, this only allows for integer based grants. If you wish to add
string grants, then use jwt_add_grant(). If you wish to add more
complex grants (e.g. an array), then use jwt_add_grants_json().
Add a new integer grant to this JWT object.
Creates a new grant for this object. The string for grant is copied internally, so do not require that the pointer or string remain valid for the lifetime of this object. It is an error if you try to add a grant that already exists.
@param jwt Pointer to a JWT object. @param grant String containing the name of the grant to add. @param val int containing the value to be saved for grant. @return Returns 0 on success, valid errno otherwise.
Note, this only allows for integer based grants. If you wish to add string grants, then use jwt_add_grant(). If you wish to add more complex grants (e.g. an array), then use jwt_add_grants_json().