Closed luanmanfre closed 6 years ago
Sorry, I don't quite understand the question. What exactly are you trying to do?
http://bshaffer.github.io/oauth2-server-php-docs/grant-types/refresh-token/ in memory.. first add a client then a user then I'm going to test generate a new access_token from the refresh that came in the query and returns me invalid
ok, i solved it.
$this->storage->setRefreshToken("refresh_token", "client_id", "user_id", strtotime("timestamp"));
$grantType = new OAuth2\GrantType\RefreshToken($this->storage, array(
'always_issue_new_refresh_token' => true,
'unset_refresh_token_after_use' => true)
);
$this->server->addGrantType($grantType);
Is possible create a server jwt using only memory storage? Because, I can not read the refresh token in memory. how is the $server->addGrantType( OAuth2\GrantType\RefreshToken ) in memory, for after so that I can then make a call to create a new access_token, all using Storage/Memory. Its possible?
ignore this structure of code
server.php
$storage = new OAuth2\Storage\Memory(...)
$server = new OAuth2\Server($storage)
in PDO storage, works with me.. but I want to test in memory.
Thanks