Similar to jwt_encode_fp() except that a string is returned. The string
must be freed by the caller. If you changed the allocation method using
jwt_set_alloc, then you must use jwt_free_str() to free the memory.
@param jwt Pointer to a JWT object.
@return A null terminated string on success, NULL on error with errno
set appropriately.
Fully encode a JWT object and return as a string.
Similar to jwt_encode_fp() except that a string is returned. The string must be freed by the caller. If you changed the allocation method using jwt_set_alloc, then you must use jwt_free_str() to free the memory.
@param jwt Pointer to a JWT object. @return A null terminated string on success, NULL on error with errno set appropriately.