@pgpm/jwt-claims 0.16.8 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Makefile +1 -1
- package/deploy/schemas/jwt_private/procedures/current_session_id.sql +18 -0
- package/package.json +5 -5
- package/pgpm-jwt-claims.control +1 -1
- package/pgpm.plan +1 -0
- package/revert/schemas/jwt_private/procedures/current_session_id.sql +7 -0
- package/sql/{pgpm-jwt-claims--0.15.3.sql → pgpm-jwt-claims--0.15.5.sql} +5 -1
- package/verify/schemas/jwt_private/procedures/current_session_id.sql +7 -0
package/Makefile
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
-- Deploy schemas/jwt_private/procedures/current_session_id to pg
|
|
2
|
+
-- Retrieves the current session ID from JWT claims (private/internal use)
|
|
3
|
+
|
|
4
|
+
-- requires: schemas/jwt_private/schema
|
|
5
|
+
|
|
6
|
+
BEGIN;
|
|
7
|
+
|
|
8
|
+
-- Returns the current session UUID from the JWT claims
|
|
9
|
+
-- Used for session tracking, revocation, and audit logging
|
|
10
|
+
-- This is kept private to prevent session IDs from being exposed to the frontend
|
|
11
|
+
CREATE FUNCTION jwt_private.current_session_id()
|
|
12
|
+
RETURNS uuid
|
|
13
|
+
AS $$
|
|
14
|
+
SELECT nullif(current_setting('jwt.claims.session_id', true), '')::uuid;
|
|
15
|
+
$$
|
|
16
|
+
LANGUAGE 'sql' STABLE;
|
|
17
|
+
|
|
18
|
+
COMMIT;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pgpm/jwt-claims",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "JWT claim handling and validation functions",
|
|
5
5
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"test:watch": "jest --watch"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"pgpm": "^
|
|
24
|
+
"pgpm": "^4.2.3"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@pgpm/types": "0.
|
|
28
|
-
"@pgpm/verify": "0.
|
|
27
|
+
"@pgpm/types": "0.18.0",
|
|
28
|
+
"@pgpm/verify": "0.18.0"
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"bugs": {
|
|
36
36
|
"url": "https://github.com/constructive-io/pgpm-modules/issues"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "8144027c7fab4956bcdebd736d04c0d4f57344bc"
|
|
39
39
|
}
|
package/pgpm-jwt-claims.control
CHANGED
package/pgpm.plan
CHANGED
|
@@ -16,3 +16,4 @@ schemas/jwt_public/procedures/current_origin [schemas/jwt_public/schema] 2017-08
|
|
|
16
16
|
schemas/jwt_private/schema 2020-12-17T06:47:34Z Dan Lynch <dlynch@Dans-MBP-3> # add schemas/jwt_private/schema
|
|
17
17
|
schemas/jwt_private/procedures/current_database_id [schemas/jwt_private/schema] 2020-12-17T23:22:28Z Dan Lynch <dlynch@Dans-MBP-3> # add schemas/jwt_private/procedures/current_database_id
|
|
18
18
|
schemas/jwt_private/procedures/current_token_id [schemas/jwt_private/schema] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/jwt_private/procedures/current_token_id
|
|
19
|
+
schemas/jwt_private/procedures/current_session_id [schemas/jwt_private/schema] 2026-01-28T05:44:00Z Dan Lynch <dlynch@constructive.io> # add schemas/jwt_private/procedures/current_session_id
|
|
@@ -140,4 +140,8 @@ $EOFCODE$ LANGUAGE plpgsql STABLE;
|
|
|
140
140
|
|
|
141
141
|
CREATE FUNCTION jwt_private.current_token_id() RETURNS uuid AS $EOFCODE$
|
|
142
142
|
SELECT nullif(current_setting('jwt.claims.token_id', true), '')::uuid;
|
|
143
|
-
$EOFCODE$ LANGUAGE sql STABLE;
|
|
143
|
+
$EOFCODE$ LANGUAGE sql STABLE;
|
|
144
|
+
|
|
145
|
+
CREATE FUNCTION jwt_private.current_session_id() RETURNS uuid AS $EOFCODE$
|
|
146
|
+
SELECT nullif(current_setting('jwt.claims.session_id', true), '')::uuid;
|
|
147
|
+
$EOFCODE$ LANGUAGE sql STABLE;
|