centrifugo icon indicating copy to clipboard operation
centrifugo copied to clipboard

[feature] Provide complete JWT body for proxied calls

Open matpuk opened this issue 2 years ago • 0 comments

Centrifugo v3 has cool feature - possibility to attach private metadata to a connection from connection proxy. But in case of JWT, the proxy is not called. The only way to use 'meta' property is to put it inside JWT token, so Centrifugo will pass it to other proxies. And here go problems. For example, I have 'tenantID' property in my JWT token and want to know it in subscription proxy. For this I'm forced to duplicate this property in my JWT token:

{
  "sub": "1234567890",
  "name": "John Doe",
  "iat": 1516239022,
  "tenantID": "432",
  "meta": { "tenantID": "432" }
}

And for every additional JWT token data I want to have access in my proxies, I need to duplicate it inside 'meta'.

As a solution, please provide complete JWT token body for every proxy call.

matpuk avatar Apr 14 '22 08:04 matpuk