这是indexloc提供的服务,不要输入任何密码
Skip to content

provide JWT token in transactions #3872

@ElixirMike

Description

@ElixirMike

In my Postgres DB, I have some tables where I have specified some default inserts based on passed in JWT token claims. This was from using a different solution..but utlimately, in Postgres, I could specify the variable using this format for example. I could place this in the default value, such that upon insert, it would use the logged in users "userid" value.

(current_setting('request.jwt.claims.userid'::text, true))::integer

Does Hasura pass the JWT claims to Postgres like this? I tried the above, but nothing was recognized so I'm wondering if you don't pass them or if you use a different format.

Metadata

Metadata

Labels

c/serverRelated to serversupport/needs-triageNeeds to be triaged so that we have enough information to add this to our backlog

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions