简体   繁体   English

如何使用FOSOAuthServerBundle使Symfony 3中的AuthorizationCode GrantType工作

[英]How to get AuthorizationCode GrantType working in Symfony 3 with FOSOAuthServerBundle

i'm trying to build a Bootstrap for a Symfony3 REST-Application with OAuth2 Support based on FOSOAuth. 我正在尝试基于FOSOAuth为具有OAuth2支持的Symfony3 REST应用程序构建Bootstrap。 My current Implementation is based on the following Sources: 我当前的实现基于以下来源:

  1. git:maxpou docker-symfony for Docker Setup git:maxpou docker-symfony用于Docker设置
  2. symfony.com - CustomUserProvider for own Userprovider symfony.com-自己的Userprovider的CustomUserProvider
  3. cause your stuck - oauth2 explained for OAuth Configuration 导致卡住-oauth2解释了OAuth配置
  4. bitgandtter.blog - A restful app for OAuth in Symfony bitgandtter.blog- Symfony中用于OAuth 的宁静应用程序

and can be found here with all Setupsteps described inside the Readme. 可以在此处找到自述文件中描述的所有设置步骤。

The Client Credentials Login is working right now, but i've got Problems with the AuthorizationCode Flow which does not redirect to client.local like described in cause your stuck - AuthorizationCode and instead redirects to the auth_login -Route again. 客户端凭据登录现在可以正常工作,但是我遇到了AuthorizationCode Flow问题,该问题未重定向至client.local您所述卡死 auth_login所述,而是再次重定向至auth_login I thought that FOSOAuth is catching the request and redirects it to client.local 我以为FOSOAuth正在捕获请求并将其重定向到client.local

Because there are so many Components involved in this i resign on posting code snippets and kindly refer to the git repository 因为涉及到如此多的组件,所以我辞职发布代码片段,并请参考git仓库

Thanks in advance for any help provided! 在此先感谢您提供的任何帮助!

  1. I had an error in my UserGeneration Algorithm which generated a wrong PasswordHash because i passed in the email as password and visa versa. 我的UserGeneration算法出错,生成了错误的PasswordHash,因为我将电子邮件作为密码传递了,反之亦然。
  2. i tried to use the security.context -Service which is deprecated since Symfony 2.6 我尝试使用自Symfony 2.6起不推荐使用的security.context -Service

The current Bootstrap now works! 当前的Bootstrap现在可以使用了!

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

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