The code snippet in this section illustrates the injection of individual JWT claim values. There are several different formats we can use for the injected value. Standard claims support the object subtypes defined in the Claim#getType field and JsonValue subtypes. Custom claim types only support the injection of the JsonValue subtypes.
The following code example illustrates injection of the standard groups and iss claims, along with customString, customInteger, customDouble, and customObject custom claims:
package io.pckt.jwt.rest;import java.util.Set;import javax.annotation.security.DenyAll;import javax.annotation.security.RolesAllowed;import javax.inject.Inject;import javax.json.JsonArray;import javax.json.JsonNumber; ...