Similar to jwt_dump_fp() except that a string is returned. The string
must be freed by the caller.
Note, this may change the content of JWT header if algorithm is set
on the JWT object. If algorithm is set (jwt_set_alg was called
on the jwt object) then dumping JWT attempts to append 'typ' header.
If the 'typ' header already exists, then it is left untouched,
otherwise it is added with default value of "JWT".
@param jwt Pointer to a JWT object.
@param pretty Enables better visual formatting of output. Generally only
used for debugging.
@return A nul terminated string on success, NULL on error with errno
set appropriately.
Return plain text representation as a string.
Similar to jwt_dump_fp() except that a string is returned. The string must be freed by the caller.
Note, this may change the content of JWT header if algorithm is set on the JWT object. If algorithm is set (jwt_set_alg was called on the jwt object) then dumping JWT attempts to append 'typ' header. If the 'typ' header already exists, then it is left untouched, otherwise it is added with default value of "JWT".
@param jwt Pointer to a JWT object. @param pretty Enables better visual formatting of output. Generally only used for debugging. @return A nul terminated string on success, NULL on error with errno set appropriately.