使用密码和客户端凭据创建客户端 oauth-server

Create client oauth-server with password and client credentials

我正在部署 Api (symfony 4.1) 的更新。我想创建 de client 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"

我终于找到了解决办法。将其放入数据库的 table 'client' 列 'allowed_grant_types':

a:3:{i:0;s:8:"password";i:1;s:18:"client_credentials";i:2;s:10:"extensions";}