简体   繁体   English

Symfony2捆绑包中是否支持OAUTH2的“资源所有者密码凭据授予”身份验证流程?

[英]Is there support for OAUTH2's 'Resource Owner Password Credentials Grant' authentication flow in Symfony2 bundle?

I have written an API which supports OAUTH2's 'Resource Owner Password Credentials Grant' authentication workflow. 我已经编写了一个支持OAUTH2的“资源所有者密码凭据授予”身份验证工作流的API。 http://tools.ietf.org/html/draft-ietf-oauth-v2-31#section-4.3 http://tools.ietf.org/html/draft-ietf-oauth-v2-31#section-4.3

I have a Symfony2 application and would like users to be able to input their username and password into a form and for the security system to exchange these with my API for an access_token. 我有一个Symfony2应用程序,希望用户能够将其用户名和密码输入表单,并使安全系统可以将其与我的API交换为access_token。

I know its possible to write a custom authentication handler to accomplish this task but if possible I'd like to use an off the shelf tool. 我知道可以编写自定义身份验证处理程序来完成此任务,但如果可能的话,我想使用现成的工具。 After some research I can see lots of libraries support only the more traditional 3 legged worktflow. 经过研究,我看到许多库仅支持更传统的三足工作流。

Are there any libraries that integrate the 'Resource Owner Password Credentials Grant' workflow into the Symfony security system? 是否有任何库将“资源所有者密码凭证授予”工作流程集成到Symfony安全系统中?

Yes, FOSOAuthServerBundle does. 是的, FOSOAuthServerBundle可以。 Grant type: client_credentials 授予类型:client_credentials

There is some documentation on it here , not specific to 'Resource Owner Password Credentials Grant' but you should be able to work it out. 有一些关于它的文件在这里 ,没有具体到“资源所有者密码凭据格兰特”,但你应该能够做得出来。 If you do, please create a PR on GitHub with some extra documentation for the bundle. 如果您这样做,请在GitHub上创建PR,并提供该捆绑包的一些其他文档。

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

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