Google Cloud IoT device SDK for embedded C  1.0.2
iotc_jwt.h File Reference

Go to the source code of this file.

Functions

iotc_state_t iotc_create_iotcore_jwt (const char *project_id, uint32_t expiration_period_sec, const iotc_crypto_key_data_t *private_key_data, char *dst_jwt_buf, size_t dst_jwt_buf_len, size_t *bytes_written)
 

Detailed Description

Creates JSON Web Tokens for authenticating to Cloud IoT Core.

Definition in file iotc_jwt.h.

Function Documentation

◆ iotc_create_iotcore_jwt()

iotc_state_t iotc_create_iotcore_jwt ( const char *  project_id,
uint32_t  expiration_period_sec,
const iotc_crypto_key_data_t private_key_data,
char *  dst_jwt_buf,
size_t  dst_jwt_buf_len,
size_t *  bytes_written 
)

Creates a JWT for authenticating to Cloud IoT Core.

Parameters
[in]expiration_period_secThe number of seconds before this JWT expires.
[in]project_idThe GCP project ID.
[in]private_key_dataES256 private key data.
[in,out]dst_jwt_bufA pointer to a buffer that stores a formatted and signed JWT.
[in]dst_jwt_buf_lenThe length, in bytes, of the buffer to which dst_jwt_buf points.
[out]bytes_writtenThe number of bytes written to the buffer to which dst_jwt_buf points.