-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question regarding storage configuration #40
Comments
No, it uses PHP's native sessions. |
Ok, thanks, do you have an example of how to use Redis? Otherwise I could fork your repo and then submit a pull for Redis if its not implemented yet. |
(Not my repo, I'm just a happy user!) The underlying library actually has support for Redis, although this package doesn't have a way to instantiate it with a connected Predis instance. I looked into it briefly (when I thought a bug I was having was due to storage - it wasn't) and implemented a |
Thank you for the answer, seeing the interface I see how it is done. |
In case anyone else stumbles across this, here is my solution as suggested by @maknz. The class I created looked like so: <?php
namespace OAuth\Common\Storage;
use Predis\Client as Predis;
class LaravelRedisStorage extends Redis implements TokenStorageInterface {
public function __construct()
{
$this->redis = \Redis::connection();
$this->key = 'oauth_user_tokens';
$this->stateKey = 'oauth_user_states';
$this->cachedTokens = array();
$this->cachedStates = array();
}
} I autoloaded this in my /**
* Storage
*/
'storage' => 'LaravelRedisStorage', |
If we have Laravel set to use Redis for sessions and our storage is set to Session, will this use Redis?
The text was updated successfully, but these errors were encountered: