Skip to content
Snippets Groups Projects
Commit 1707b4bf authored by Krzysztof Putyra's avatar Krzysztof Putyra
Browse files

Added column type _jwt

parent 681cbd92
No related branches found
No related tags found
4 merge requests!691New version v24.3.0,!638Merge Develop to B16343,!637develop into F17086-Multiple-Forms-on-a-page,!633JWT and enhanced parser
Pipeline #11154 passed
......@@ -712,6 +712,8 @@ Summary:
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|_decrypt |:ref:`column-decrypt` - Decrypt value. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|_jwt |:ref:`column-jwt` - generates a json web token from the provided data. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. _column-link:
......@@ -1802,6 +1804,37 @@ Decrypting selected columns or strings which are encrypted with QFQ.
10.sql = SELECT secret AS _decrypt FROM Person WHERE id = 1
.. _column-jtw:
Column: _jwt
^^^^^^^^^^^^
Creates a `json web token <https://jwt.io/>`_ from the provided data.
Supported options:
+-----------+---------------+-------+
| Parameter | Default value | Note |
+===========+===============+=======+
| `alg` | `HS256` | The signing algorithm - it is included in the header |
| `key` | (none) | The secret key used for signing the token |
+-----------+---------------+-------+
Predefined claims:
+-------+---------+---------------+------+
| Claim | Present | Default value | Note |
+=======+=========+===============+======+
| `iss` | always | `qfq` | The default value might be also specified in QFQ settings |
| `iat` | always | current timestamp | Ignores any provided value |
| `exp` | when specified | none | Prefix with `+` to specify a relative timestamp |
| `nbf` | when specified | none | Prefix with `+` to specify a relative timestamp |
+-------+---------+---------------+------+
**Syntax** ::
10.sql = SELECT 'exp:+3600,data:{msg:default alg}|secretKey' AS _jwt
20.sql = SELECT 'exp:+60,data:{msg:explicit agl}|secretKey|ES384' AS _jwt
.. _copyToClipboard:
Copy to clipboard
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment