Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我目前正在使用 Kong API 网关。使用登录并检索会话后。用户名不会转发到后端服务。如何从 Kong 提供的会话令牌中获取用户名?
插件:
当您在登录时创建令牌时,您可以在令牌有效负载中添加用户名。因此,一旦您使用令牌在后端,您就可以解密它并从有效负载本身获取用户名。