Redis

Overview

Uses the Redis Key-Value Storage System for storing and retrieving objects in OAuth.

Installation

First, install the Redis client library for PHP

Text
$ composer require predis/predis:dev-master

Get Started

Once this is done, create a connection instance to connect to the redis server.

Php
$predis = new \Predis\Client();

Then, create the storage object using the Redis storage class:

Php
$storage = new OAuth2\Storage\Redis($predis);

// now you can perform storage functions, such as the one below
$storage->setClientDetails($client_id, $client_secret, $redirect_uri);

Usage

The Redis storage engine implements all the standard Storage Interfaces supported in this library. See interfaces for more information.

Fork me on GitHub