2

I'm currently using Kong API gateway. After using logging in and retrieving a session. The username is not forwarded to the backend service. How do I get the username from the session token provided by Kong?

plugins:

  • name: basic-auth service: login-service config: hide_credentials: true
  • name: session service: login-service config: secret: opensesame cookie_samesite: Lax
Hany Morcos
  • 147
  • 1
  • 5

1 Answers1

0

When you are creating the token while logging in, you can add the username in the token payload. So once you are on the backend with the token you can decrypt it and fetch the username from payload itself.

wave
  • 61
  • 5