JWT module header file. More...
Go to the source code of this file.
Data Structures | |
struct | jwt_t |
JWT Module handler. More... | |
Functions | |
E_MCL_ERROR_CODE | jwt_initialize (security_handler_t *security_handler, E_MCL_SECURITY_PROFILE security_profile, string_t *tenant, jwt_t **jwt) |
JWT Initializer. More... | |
string_t * | jwt_get_token (jwt_t *jwt) |
Used to generate the JWT Token as json string. More... | |
void | jwt_destroy (jwt_t **jwt) |
To destroy the JWT Handler. More... | |
JWT module header file.
Definition in file jwt.h.
void jwt_destroy | ( | jwt_t ** | jwt | ) |
To destroy the JWT Handler.
Will release the resources of JWT Handler. After destroy operation, handler shouldn't be used.
[in] | jwt | JWT Handler to destroy |
Definition at line 128 of file jwt.c.
References DEBUG_ENTRY, DEBUG_LEAVE, json_util_destroy(), MCL_DEBUG, MCL_FREE, and MCL_NULL.
Referenced by _compose_access_token_request_payload(), and jwt_initialize().
Used to generate the JWT Token as json string.
[in] | jwt | JWT Handler. |
Definition at line 97 of file jwt.c.
References _generate_token(), DEBUG_ENTRY, DEBUG_LEAVE, jwt_t::header, json_util_to_string(), MCL_NULL, MCL_OK, jwt_t::payload, string_destroy(), and string_initialize_dynamic().
Referenced by _compose_access_token_request_payload().
E_MCL_ERROR_CODE jwt_initialize | ( | security_handler_t * | security_handler, |
E_MCL_SECURITY_PROFILE | security_profile, | ||
string_t * | tenant, | ||
jwt_t ** | jwt | ||
) |
JWT Initializer.
[in] | security_handler | Already initialized security handler. All JWT operations will be done using this object. |
[in] | security_profile | Onboarding security profile. Important to get correct kind of authentication JWT. |
[in] | tenant | Tenant which will be set in JWT payload. |
[out] | jwt | The newly initialized jwt handler. |
Definition at line 70 of file jwt.c.
References _create_self_issued_jwt_header(), _create_self_issued_jwt_payload(), ASSERT_CODE_MESSAGE, ASSERT_STATEMENT_CODE_MESSAGE, DEBUG_ENTRY, DEBUG_LEAVE, jwt_destroy(), MCL_NEW, MCL_NULL, MCL_OK, and MCL_OUT_OF_MEMORY.
Referenced by _compose_access_token_request_payload().