ZF-Commons / ZfcUser

A generic user registration and authentication module for ZF2. Supports Zend\Db and Doctrine2. (Formerly EdpUser)
BSD 3-Clause "New" or "Revised" License
497 stars 343 forks source link

Authentication adapter should not know anything about authentication storage #513

Open ojhaujjwal opened 10 years ago

ojhaujjwal commented 10 years ago

Authentication adapter should not know anything about authentication storage. See ZfcUser/Authentication/Adapter/Db.php#L111.

In restful applications, it is common these days not to use session but to use access tokens.

ojhaujjwal commented 10 years ago

ping @Danielss89 , @Ocramius

Ocramius commented 10 years ago

Absolute URI: https://github.com/ZF-Commons/ZfcUser/blob/7c2187bbdab00d32c9251cd95d70ccb1aa8d6975/src/ZfcUser/Authentication/Adapter/Db.php#L111

Ocramius commented 10 years ago

Yes, I agree here. This should probably be handled by the auth storage directly on write (if the storage value changes). It may be trivial to write a wrapper around a generic storage to do that.

adamlundrigan commented 9 years ago

I've run into this with ZfcUser 1.2.x when trying to integrate with Apigility. Here's how I worked around it (module coming soon)

EvanDotPro commented 9 years ago

Happened to be looking into this for something else. We could definitely make it easier to support this use-case.