简体   繁体   English

php oauth2 服务器授权码授予

[英]php oauth2 server Authorization Code Grant

I'm trying to create oauth2 server with php by this https://itnext.io/an-oauth-2-0-introduction-for-beginners-6e386b19f7a9 (Authorization Code Grant)我正在尝试通过此https://itnext.io/an-oauth-2-0-introduction-for-beginners-6e386b19f7a9 (授权码授予)使用 php 创建 oauth2 服务器

Everything works fine, I get access_token, but one thing is not clear - how does Resourse server identify a user if access_token is created without users credentials?一切正常,我得到 access_token,但有一点不清楚 - 如果在没有用户凭据的情况下创建 access_token,资源服务器如何识别用户?

Your Resource server doesn't need the user credentials.您的资源服务器不需要用户凭据。 It only need to check that de access_token is valid and them will do his treatment.它只需要检查 de access_token 是否有效,他们会做他的处理。

The access_token should contain some informations that will idendify the user. access_token 应该包含一些可以识别用户的信息。

For more details about Resource_server inside oauth2: link有关 oauth2 中的 Resource_server 的更多详细信息:链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM