oauth2-server-redis icon indicating copy to clipboard operation
oauth2-server-redis copied to clipboard

[Proposal] Global prefix

Open drekinov opened this issue 10 years ago • 2 comments

Hello, I think it will be nice to have an option to set global prefix of all Storage Implementation. In case you use one Redis instance/db you will have collision between settings, clients, tokens etc. Simplest implementation could be a second constructor parameter at RedisAdapter

//RedisAdapter
 public function __construct(Client $redis, $globalPrefix = '') 

// Use
$server->setClientStorage(new Lewis\OAuth2\Server\Storage\RedisClient($redis, 'application1'));

I could try to implement it if it will be accepted as pull request

drekinov avatar Aug 16 '14 22:08 drekinov

Everything is currently prefixed with "oauth" as it stands. But I suppose some might want to have a different prefix. Perhaps implement it, but have the default as "oauth". Does that make sense?

Honestly I haven't kept up with the League's progress on this package so I don't even know if the package works with the latest development version of 4.0. Does it?

jasonlewis avatar Aug 17 '14 10:08 jasonlewis

I build new Redis Storage package support with the latest version of Alex's library (4.*), but do not have yet Unit Tests. I was inspired from this package, thanks jasonlewis.

fahmiardi avatar Jan 16 '15 02:01 fahmiardi