JWT module header file. More...
Go to the source code of this file.
Data Structures | |
struct | jwt_t |
Functions | |
MCL_LOCAL mcl_error_t | jwt_initialize (security_handler_t *security_handler, E_MCL_SECURITY_PROFILE security_profile, char *tenant, jwt_t **jwt) |
MCL_LOCAL char * | jwt_get_token (jwt_t *jwt) |
MCL_LOCAL void | jwt_destroy (jwt_t **jwt) |
JWT module header file.
This module is used to generate JWT.
Definition in file jwt.h.
This function destroys jwt_t data structure.
[in] | jwt | JWT handle which is going to be destroyed. |
Definition at line 124 of file jwt.c.
References json_util_destroy(), MCL_DEBUG, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FREE, and MCL_NULL.
Referenced by _compose_access_token_request_payload(), and jwt_initialize().
This function is used to generate the JWT as json string.
[in] | jwt | JWT handle. |
Definition at line 90 of file jwt.c.
References _generate_token(), jwt_t::header, mcl_core_return_code_strings, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_ERROR, MCL_FREE, mcl_json_util_to_string(), MCL_NULL, MCL_OK, and jwt_t::payload.
Referenced by _compose_access_token_request_payload().
MCL_LOCAL mcl_error_t jwt_initialize | ( | security_handler_t * | security_handler, |
E_MCL_SECURITY_PROFILE | security_profile, | ||
char * | tenant, | ||
jwt_t ** | jwt | ||
) |
This function creates and initializes a data struct of jwt_t.
[in] | security_handler | Already initialized security handler. All JWT operations will be done using this object. |
[in] | security_profile | Onboarding security profile. |
[in] | tenant | Tenant which will be set in JWT payload. |
[out] | jwt | The newly initialized jwt handle. |
Definition at line 62 of file jwt.c.
References _create_self_issued_jwt_header(), _create_self_issued_jwt_payload(), jwt_destroy(), MCL_ASSERT_CODE_MESSAGE, MCL_ASSERT_STATEMENT_CODE_MESSAGE, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_NEW, MCL_NULL, MCL_OK, and MCL_OUT_OF_MEMORY.
Referenced by _compose_access_token_request_payload().