Associating Required JSON Web Token Claims with REST API Methods

The Add JSON Web Token Claims dialog enables you to specify the claims that must be present in a JSON Web Token (JWT) in order to access a JADE REST API method. As long as one or more required claims are associated with a method, any incoming REST request must include a JSON Web Token in the authorization header of the HTTP request; that is, it must include a header of the form Authorization: Bearer <Token>.

When a REST API method (a method of a subclass of the JadeRestService class, associated with an application of type Rest Services or Rest Services, Non‑Gui) has required claims associated with it, a new method is generated and added to the class of that method. This method is named the same as the REST API method except that it is prefixed with s__ and is hereafter known as a shadow method. The shadow method is used by the REST service to get the JadeRequiredClaimAnnotations associated with the REST API method.

As the shadow method is generated, it should not be modified. If you want to modify the claims associated with the REST API method, use the Add JSON Web Token Claims dialog to modify an existing set of required claims.

When a method of any subclass of the JadeRestService class is selected, select the REST Security Options command in the JADE development environment Methods menu to open the Add JSON Web Token Claims dialog. For details, see the following subsection.

2020.0.01 and higher