nRF Connect SDK API 2.8.0
Loading...
Searching...
No Matches
modem_jwt.h File Reference

Request a JWT from the modem. More...

#include <zephyr/types.h>
#include <modem/modem_attest_token.h>

Go to the source code of this file.

Data Structures

struct  jwt_data
 JWT parameters required for JWT generation and pointer to generated JWT. More...
 

Enumerations

enum  jwt_key_type { JWT_KEY_TYPE_CLIENT_PRIV = 2 , JWT_KEY_TYPE_ENDORSEMENT = 8 }
 The type of key to be used for signing the JWT. More...
 
enum  jwt_alg_type { JWT_ALG_TYPE_ES256 = 0 }
 JWT signing algorithm. More...
 

Functions

int modem_jwt_generate (struct jwt_data *const jwt)
 Generates a JWT using the supplied parameters. If successful, the JWT string will be stored in the supplied struct. This function will allocate memory for the JWT if the user does not provide a buffer. In that case, the user is responsible for freeing the memory by calling modem_jwt_free.
 
int modem_jwt_get_uuids (struct nrf_device_uuid *dev, struct nrf_modem_fw_uuid *mfw)
 Gets the device and/or modem firmware UUID from the modem and returns it as a NULL terminated string in the supplied struct(s). The device UUID can be used as a device identifier for cloud services and for secure device management using the nRF Cloud Identity Service. The modem firmware UUID represents the installed modem firmware version.
 
void modem_jwt_free (char *const jwt_buf)
 Frees the JWT buffer allocated by modem_jwt_generate.
 

Detailed Description

Request a JWT from the modem.