Symfony FOSOAuthServerBundle“;“找不到客户端”;
我正在尝试使用FOSOAuthServerBundle,一切正常。我可以使用oauth/v2/auth对用户进行身份验证,但如果用户名和密码正确,我会收到以下错误消息:Symfony FOSOAuthServerBundle“;“找不到客户端”;,symfony,fosuserbundle,fosrestbundle,Symfony,Fosuserbundle,Fosrestbundle,我正在尝试使用FOSOAuthServerBundle,一切正常。我可以使用oauth/v2/auth对用户进行身份验证,但如果用户名和密码正确,我会收到以下错误消息: Client not found. 404 Not Found - NotFoundHttpException 堆栈跟踪 在第138行的/var/www/www.billtrackapp.com/vendor/friendsofsymfony/oauth-server-bundle/FOS/OAuthServerBundle/
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); 如果(null==$client){ 抛出新的NotFoundHttpException('未找到客户端'); } $this->client=$client 希望你能在这个问题上帮助我
谢谢。嗯,我不知道这是不是你的案子,但我的案子在命名空间中。您需要查看客户机是否位于Entity-s文件夹或Model文件夹中,这取决于您正在执行的实现。希望这有帮助。我的客户代码:
<?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;
}
}
我在Github上看到您发现了问题。你能分享一下解决方案吗?我和你有同样的问题,同样的问题。你能分享解决方案吗?你能分享你的客户吗?orm?@Sebastien Thiebaud你是如何解决这个问题的?