zf-fr / zfr-oauth2-server

PHP library for creating an OAuth 2 server (currently proof of concept)
BSD 3-Clause "New" or "Revised" License
36 stars 13 forks source link

Support for extending entities #25

Closed ojhaujjwal closed 9 years ago

ojhaujjwal commented 10 years ago

I can't extend the entities. See how awesomely FOSOAuthServerBundle supports this.

bakura10 commented 10 years ago

Thanks for the links. I'm sorry, I'm really busy here in japan, I finally didn't have the time to answer you :(.

@mac_nibblet if you have some time looking at this...

Envoyé de mon iPhone

Le 30 août 2014 à 01:27, Ujjwal Ojha notifications@github.com a écrit :

I can't extend the entities. See how awesomely FOSOAuthServerBundle supports this.

— Reply to this email directly or view it on GitHub.

Ocramius commented 10 years ago

@ojhaujjwal what's the use-case? Shouldn't you replace repositories instead?

ojhaujjwal commented 10 years ago

I am thinking to have multiple token owners, client and users because I use client credentials grant and password grant. But, I am not really sure on this. See #23

So, there is a token owner entity Application\Entity\TokenOwner. User and client entites have one-to-one relation with token owner. So, I need to extend the client entity. But, the client entity is not a mapper-superclass like FOSOAuthServerBundle.

Ocramius commented 10 years ago

@ojhaujjwal you may want to look into the resolve target entity listener

ojhaujjwal commented 10 years ago

See #23 which was my use-case. I have fixed that issue.