pgpm-jwt-claims
Agentic DB - Give your agent a brain
pgpm-jwt-claims · Agentic DB - Give your agent a brain
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101679 | pgpm-jwt-claims | pgpm-jwt-claims | 0.15.5 | SEC | MIT | C |
| Relationships | |
|---|---|
| Requires | pgpm-types pgpm-verify plpgsql |
Usage
Sources:
- Official upstream README
- Official extension control file (pgpm-jwt-claims.control)
- Official extension SQL (pgpm-jwt-claims–0.15.5.sql)
pgpm-jwt-claims — @pgpm/jwt-claims provides PostgreSQL functions for extracting and working with JWT (JSON Web Token) claims stored in PostgreSQL session variables. Use it when implementing the corresponding security, audit, or access-control workflow. Its extension dependencies must be installed and validated first.
Core Workflow
Install the extension in the intended database, run the smallest upstream example above when available, and verify the installed version and returned values before integrating it into application SQL.
Important Objects
ctx.ip_address()is an extension function and returnsinet.ctx.is_security_definer()is an extension function.ctx.origin()is an extension function and returnsorigin.ctx.security_definer()is an extension function and returnstext.ctx.uagent()is an extension function and returnstext.ctx.uid()is an extension function and returnsuuid.jwt_private.current_database_id()is an extension function and returnsuuid.jwt_private.current_session_id()is an extension function and returnsuuid.jwt_private.current_token_id()is an extension function and returnsuuid.jwt_public.current_ip_address()is an extension function and returnsinet.jwt_public.current_origin()is an extension function and returnsorigin.jwt_public.current_user_agent()is an extension function and returnstext.jwt_public.current_user_id()is an extension function and returnsuuid.ctxis a schema created by the extension.
Requirements and Caveats
- The reviewed control file declares default version
0.15.5. - Install the confirmed extension dependencies first:
plpgsql,pgpm-types,pgpm-verify. - The control file marks the extension as non-relocatable.
- The control file does not require superuser-only installation.
- Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.