jwtClaimAddJSON (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

All

Firmware version:

1.70.00


jwtClaimAddJSON adds claims from the provided JSON encoded string to the JWT object.

It will overwrite existing claims.

 

Input:

jwt : SYSHANDLE

A handle to the JWT object.

 

value : STRING

The JSON encoded string with the claims to add.

 

 

 

Returns: INT

1

- Success

0

- Function is not supported.

-1

- Invalid name.

-2

- Could not find JWT object.

-6

- Claim already exists.

-99

- Failed to add claim.

 

 

Declaration:

FUNCTION jwtClaimAddJSON : INT;
VAR_INPUT
  jwt   : SYSHANDLE;
  value : STRING;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  rc  : INT;
  jwt : SYSHANDLE;
END_VAR;
 
BEGIN
  ...
  // Add claim
  rc := jwtClaimAddJSON(jwt := jwt, value := "{$"map$@:{$"a$":47,$"b$":5}}");
  ...
END;
 
END_PROGRAM;