Spring 中的 oAuth2 令牌验证/验证 [英] oAuth2 Token validation/verification in Spring

查看:73
本文介绍了Spring 中的 oAuth2 令牌验证/验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果授权服务器和资源服务器驻留在不同的机器上,Spring 是否提供预构建的令牌验证/验证方式?有最佳实践吗?在资源服务器可以调用验证的授权服务器上创建我自己的服务,你怎么看?

Does Spring provide a pre-built way of token validation/verification if the authorization server and resource server reside on different boxes? Is there a best practice? What do you think about creating my own service at the authorization server that the resource server can call for validation?

推荐答案

需要吗?资源服务器的 OAuth2ProtectedResourceFilter 应该根据授权服务器用来存储令牌的同一个数据库来验证令牌.

Is that needed? The Resource Server's OAuth2ProtectedResourceFilter should validate the token against the same database that the Authorization Server used to store the token.

这篇关于Spring 中的 oAuth2 令牌验证/验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆