25 lines
282 B
C
25 lines
282 B
C
|
/**
|
||
|
* JWT utilities
|
||
|
*/
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include <stddef.h>
|
||
|
#include "cJSON.h"
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
extern "C"
|
||
|
{
|
||
|
#endif
|
||
|
|
||
|
/**
|
||
|
* Sign JWT token
|
||
|
*
|
||
|
* Return encoded JWT or NULL in case of failure
|
||
|
*/
|
||
|
char *jwt_gen(cJSON *payload);
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
}
|
||
|
#endif
|