CryptoAuthLib
Microchip CryptoAuthentication Library
atca_jwt.h File Reference

Utilities to create and verify a JSON Web Token (JWT) More...

#include "cryptoauthlib.h"

Go to the source code of this file.

Data Structures

struct  atca_jwt_t
 Structure to hold metadata information about the jwt being built. More...
 

Functions

ATCA_STATUS atca_jwt_init (atca_jwt_t *jwt, char *buf, uint16_t buflen)
 Initialize a JWT structure. More...
 
ATCA_STATUS atca_jwt_add_claim_string (atca_jwt_t *jwt, const char *claim, const char *value)
 Add a string claim to a token. More...
 
ATCA_STATUS atca_jwt_add_claim_numeric (atca_jwt_t *jwt, const char *claim, int32_t value)
 Add a numeric claim to a token. More...
 
ATCA_STATUS atca_jwt_finalize (atca_jwt_t *jwt, uint16_t key_id)
 Close the claims of a token, encode them, then sign the result. More...
 
void atca_jwt_check_payload_start (atca_jwt_t *jwt)
 Check the provided context to see what character needs to be added in order to append a claim. More...
 
ATCA_STATUS atca_jwt_verify (const char *buf, uint16_t buflen, const uint8_t *pubkey)
 Verifies the signature of a jwt using the provided public key. More...
 

Detailed Description

Utilities to create and verify a JSON Web Token (JWT)