symfony - 使用密码和客户端凭据创建客户端 oauth-server
问题描述
我正在部署 Api (symfony 4.1) 的更新。我想创建 de 客户端 oauth-server,但我需要两种授权类型(密码和 client_credentials)。在旧的部署中,api 适用于两种授权类型。如何指定密码和客户端凭据授予类型?
我使用这个命令:
php bin/console fos:oauth-server:create-client --redirect->uri="api/login" --grant-type="password"
或者
php bin/console fos:oauth-server:create-client --redirect->uri="api/login" --grant-type="client_credentials"
解决方案
最后我找到了解决方案。把它放在数据库的表 'client' 列 'allowed_grant_types' 中:
a:3:{i:0;s:8:"密码";i:1;s:18:"client_credentials";i:2;s:10:"extensions";}
推荐阅读
- javascript - 动态添加工具提示
- sql - 来自 apache spark sql 的 ParseException 错误
- amazon-web-services - 附加/附加到传递给cloudformation的用户数据?
- mongodb - 尝试下载支持 mongodb 源配置配置元素的插件
- events - 如何在 rxjs 上创建可重放的事件总线
- json - 在反应中获取json数据显示TypeError
- android - 如何在纹理视图中获得缩放预览(位图)?
- .net - 无法连接到 Web 服务器“IIS express”。当我在 applicationhost.config 中添加新绑定时
- r - 如何使用 ggplot 在同一轴上绘制 2 个相关变量?
- ios - 当使用 UIView.animate 动画视图时,其他视图也不需要动画