Problem with server-side filters {user.id} not working

I have been banging my head against the wall here and searching with zero luck in finding a resolution.

I’m using DF 4.6.1 installed on a local docker.
I’ve set up a Postgres database 12.4 on AWS RDS.

I’m trying to get row-level security to work by passing in {user.id} values and it’s returning a blank resource request.

If I hard-code the user id into the advanced filters - it works correctly.

Once I try adding {user.id} into the value, I get “Field ‘user_id’ must be a valid integer.”

I’ve tried everything to get this to work:

  • I’ve tried moving the variable to a lookup key on the service
  • I’ve tried adding the lookup key to the user account as a variable
  • I’ve tried using {user.email} instead thinking maybe it’s a data translation issue

I’ve spent hours searching with no luck here on how to resolve this. Per the docs, this should work.

Ok - if anyone else has this issue…of course it was something dumb.

I found that my JWT session token was null because when I authenticated, I mis-typed X-DreamFactory-Session-Token (I had X-DreamFactory-Session-Key instead.)