我正在尝试使用FOSOAuthServerBundle,一切都很好。我可以使用oauth/v2/auth来验证用户的身份,但是,如果用户名和密码都很好,我会收到以下错误消息:
Client not found.
404 Not Found - NotFoundHttpException第138行/var/www/www.billtrackapp.com/vendor/friendsofsymfony/oauth-server-bundle/FOS/OAuthServerBundle/Controller/AuthorizeController.php中的堆栈跟踪 ->findClientByPublicId($clientId);if (null === $client) {抛出新NotFoundHttpException(‘客户端未找到.’);} $this->client = $client;
希望你能在这个问题上帮我。
谢谢。
发布于 2013-06-13 10:47:38
嗯,我不知道这是不是你的情况,但我的是在名称空间中。您需要查看您的客户是在实体的文件夹还是模型文件夹中,并取决于您正在执行的实现。希望这能有所帮助。我的客户代码:
<?php
// src/Azimut/ApiBundle/Entity/Client.php
namespace Azimut\ApiBundle\Entity;
use FOS\OAuthServerBundle\Entity\Client as BaseClient;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
*/
class Client extends BaseClient
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
public function __construct()
{
parent::__construct();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
}https://stackoverflow.com/questions/14719307
复制相似问题