Home > @i2analyze/i2connect > jwt
jwt() function
The @jwt
decorator, which configures a service method parameter to receive a JSON Web Token (JWT).
Signature:
export declare function jwt(): ParameterDecorator;
Returns:
ParameterDecorator
Introduced: API version 1.0
Remarks
JSON Web Tokens are used as part of the authentication process for web connectors.
Connections to data sources are usually anonymous, or else they use a shared key. In some cases, however, it is useful to know the identity of the user that submitted the request. The decorated parameter contains the decoded JWT that was used to authenticate the user with the i2 Connect gateway. As the structure of the token can vary, you will need to parse it to extract the information you need.