有没有更好的方法使用 django-simple-jwt 在 djangoREST 中跨服务验证令牌
Is there a better way to verify tokens across services in djangoREST using django-simple-jwt
我有两个不同托管的 Django 后端,一个是身份验证服务 (ServiceA),它处理所有身份验证,包括使用 djangorest-simple-jwt 库生成令牌。另一个是我的业务逻辑服务(ServiceB)。
'ServiceA' 上有一条验证令牌的路由 token/verify。我目前在处理请求之前通过在 ServiceA 上调用 token/verify 来验证 'ServiceB' 上的令牌,我认为这不是两种服务之间通信的最佳方式。您有什么更好的建议。
你看过JWTTokenUserAuthentication了吗?
This can facilitate developing single sign-on functionality between separately hosted Django apps which all share the same token secret key.
我有两个不同托管的 Django 后端,一个是身份验证服务 (ServiceA),它处理所有身份验证,包括使用 djangorest-simple-jwt 库生成令牌。另一个是我的业务逻辑服务(ServiceB)。 'ServiceA' 上有一条验证令牌的路由 token/verify。我目前在处理请求之前通过在 ServiceA 上调用 token/verify 来验证 'ServiceB' 上的令牌,我认为这不是两种服务之间通信的最佳方式。您有什么更好的建议。
你看过JWTTokenUserAuthentication了吗?
This can facilitate developing single sign-on functionality between separately hosted Django apps which all share the same token secret key.