Lusitanian/PHPoAuthLib — pull request #60 by hannesvdvreken (2013-07-09 22:54:29+00:00)
Title: TokenStorage refactor + Testing + PRedis

Hi!

Did some work on this because it had me itching for a while.

First: it bothered me that if the storage returned a token, it could still go wrong if that token was generated using another service class. Eg: user signs in with Foursquare first, later on he wants to link his Twitter account. You'd had to deal with some exceptions.

I changed some specs to the StorageInterface, updated all the necessary TestCase's, and refactored them a bit as well. Then I modified the AbstractService classes so they could work with the changed StorageInterfaces.

Have fun!

One extra note: I changed the Redis dependency to PRedis. I think that one is more commonly used.

Kind regards,
Hannes