学说 oauth 无法转换为数组

doctrine oauth could not convert to array

我将 doctrine2 与 oauth2 一起使用,但我总是在 oauth 请求获取令牌时遇到错误。

Could not convert database value "xyz" to Doctrine Type array

Client_OAuth2 grant_type 列的确切格式是什么?我尝试使用序列化值和简单文本...我需要密码作为授权类型。如果 grant_type 为空,则有效。

grant_type 字段在实体中定义为 Array。因此,只需使用数组的序列化值作为它的值。

例如:如果要保存 array('client_credentials'),请将此序列化值保存在 grant_type 字段上 a:1:{i:0;s:18:"client_credentials";}