nRF Connect SDK API 3.4.99
Loading...
Searching...
No Matches

◆ nrf_cloud_jwt_app_generate()

int nrf_cloud_jwt_app_generate ( uint32_t time_valid_s,
char * jwt_buf,
size_t jwt_buf_sz )

#include <nrf_cloud.h>

Generate application-provided JWT. Must be implemented by the application when.

CONFIG_NRF_CLOUD_JWT_SOURCE_APP 

is enabled. Called by nrf_cloud_jwt_generate.

Parameters
[in]time_valid_sHow long (seconds) the JWT should be valid. Already defaulted/capped by nrf_cloud_jwt_generate. May be ignored if the signer cannot set a lifetime.
[in,out]jwt_bufBuffer to hold the null-terminated JWT.
[in]jwt_buf_szSize of the buffer.
Return values
0JWT generated successfully.
-ETIMESigner does not have valid date/time, JWT not generated.
Returns
A negative value indicates an error.