【问题标题】:The resource owner or authorization server denied the request. laravel passport资源所有者或授权服务器拒绝了该请求。 laravel 护照
【发布时间】:2021-10-19 00:51:35
【问题描述】:

资源所有者或授权服务器拒绝了该请求。 {"exception":"[object] (League\OAuth2\Server\Exception\OAuthServerException(code: 9)

我在 Stripe 应用中退款时遇到此错误。

上面说token已经被撤销了。

我该如何解决这个问题?

【问题讨论】:

  • 你能解决这个问题吗?
  • @hassanrazadev 我猜不是因为我没有看到任何正确的遮阳篷!

标签: php laravel laravel-passport


【解决方案1】:

您可以按照this laracast discussion 中的建议阻止此异常。

覆盖并添加以下条件到Handler 类的report() 方法。

\App\Exception\处理程序

public function report(Exception $exception)
{
    if ($exception instanceof \League\OAuth2\Server\Exception\OAuthServerException && $exception->getCode() == 9) {
        return;
    }
    parent::report($exception);
}

【讨论】:

    猜你喜欢
    • 2019-09-05
    • 1970-01-01
    • 1970-01-01
    • 2018-12-23
    • 1970-01-01
    • 2014-07-26
    • 1970-01-01
    • 2018-09-26
    • 2017-12-22
    相关资源
    最近更新 更多