jwtClaimAddDint (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

All

Firmware version:

1.70.00


jwtHeaderAddDint adds a new integer claim to the JWT object.

If the claim already exists, it must be deleted first with jwtClaimDelete.

 

Input:

jwt : SYSHANDLE

A handle to the JWT object.

 

name : STRING

The name of the claim to add.

 

value : DINT

The value 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 jwtClaimAddDint : INT;
VAR_INPUT
  jwt   : SYSHANDLE;
  name  : STRING;
  value : DINT;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  rc  : INT;
  jwt : SYSHANDLE;
END_VAR;
 
BEGIN
  ...
  // Add claim
  rc := jwtClaimAddDint(jwt := jwt, name := "admin", value := 42);
  ...
END;
 
END_PROGRAM;