首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >FOSOAuthServerBundle“未找到客户端”

FOSOAuthServerBundle“未找到客户端”
EN

Stack Overflow用户
提问于 2013-02-06 00:05:36
回答 1查看 1.1K关注 0票数 2

我正在尝试使用FOSOAuthServerBundle,一切都很好。我可以使用oauth/v2/auth来验证用户的身份,但是,如果用户名和密码都很好,我会收到以下错误消息:

代码语言:javascript
复制
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;

希望你能在这个问题上帮我。

谢谢。

EN

回答 1

Stack Overflow用户

发布于 2013-06-13 10:47:38

嗯,我不知道这是不是你的情况,但我的是在名称空间中。您需要查看您的客户是在实体的文件夹还是模型文件夹中,并取决于您正在执行的实现。希望这能有所帮助。我的客户代码:

代码语言:javascript
复制
    <?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;
        }
    }
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14719307

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档