我正在开发使用由Alex Bilbie提供thephpleague库中的OAuth 2.0服务器。 但是,经过初始化授权服务器,当我宣布存储类,它抛出一个下面的错误。
“致命错误:类‘存储\ sessionStorage的’找不到”
请帮我解决这个问题。 我看了你的这个问题张贴在这里: - 指引我使用thephpleague库实现的oauth2 PHP服务器
请让我知道我可以实现存储类。 我当前的代码:
require_once "/../vendor/autoload.php";
$server = new \League\OAuth2\Server\AuthorizationServer;
$server->setSessionStorage(new Storage\SessionStorage);
$server->setAccessTokenStorage(new Storage\AccessTokenStorage);
$server->setClientStorage(new Storage\ClientStorage);
$server->setScopeStorage(new Storage\ScopeStorage);
$server->setAuthCodeStorage(new Storage\AuthCodeStorage);
$authCodeGrant = new \League\OAuth2\Server\Grant\AuthCodeGrant();
$server->addGrantType($authCodeGrant);