jwt.h
Go to the documentation of this file.
1 /*!**********************************************************************
2  *
3  * @copyright Copyright (C) 2016 Siemens Aktiengesellschaft.\n
4  * All rights reserved.
5  *
6  *************************************************************************
7  *
8  * @file jwt.h
9  * @date Jun 28, 2016
10  * @brief JWT module header file.
11  *
12  * This module performs JWT operations : generates onboarding and authentication JWT's.
13  *
14  ************************************************************************/
15 
16 #ifndef JWT_H_
17 #define JWT_H_
18 
19 #include "security_handler.h"
20 #include "json_util.h"
21 
25 typedef struct jwt_t
26 {
32 } jwt_t;
33 
48 
56 
64 void jwt_destroy(jwt_t **jwt);
65 
66 #endif //JWT_H_
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.
Definition: jwt.c:70
E_MCL_SECURITY_PROFILE
Definitions of different security profiles for onboarding.
Definition: mcl_common.h:78
Json util module header file.
json_t * payload
Payload of jwt.
Definition: jwt.h:28
mcl_time_t issued_at
Time of issue.
Definition: jwt.h:31
E_MCL_ERROR_CODE
MCL Error code definitions. Every function returning an error code uses this enum values...
Definition: mcl_common.h:137
time_t mcl_time_t
Definition: mcl_common.h:48
security_handler_t * security_handler
Security handler.
Definition: jwt.h:29
string_t * jwt_get_token(jwt_t *jwt)
Used to generate the JWT Token as json string.
Definition: jwt.c:97
json_t * header
Header of jwt.
Definition: jwt.h:27
Handle struct for security_handler module.
E_MCL_SECURITY_PROFILE security_profile
Security profile.
Definition: jwt.h:30
JWT Module handler.
Definition: jwt.h:25
void jwt_destroy(jwt_t **jwt)
To destroy the JWT Handler.
Definition: jwt.c:128
Security handler module header file.
This struct is used for json handling.
Definition: json_util.h:27