教程中的错误
public function update(AuthorizationServer $server, ServerRequestInterface $serverRequest)
{
try {
return $server->respondToAccessTokenRequest($serverRequest, new Psr7Response);
} catch(OAuthServerException $e) {
return $this->response->errorUnauthorized($e->getMessage());
}
}
教程update中这一段是错误的,没有定义response
return $this->response->errorUnauthorized($e->getMessage());
改为
throw new AuthenticationException($e->getMessage());
推荐文章: