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

Is using Doctrine ODM possible ?

Open etshy opened this issue 3 years ago • 7 comments

I only saw ORM references to store token but I prefer ask in case I missed something. There is currently no way to use Doctrine ODM right ? I didn't see any way to make my own persitence either.

etshy avatar Sep 29 '22 23:09 etshy

Indeed. I won't work on this myself, but I would welcome a PR adding support for the ODM.

chalasr avatar Oct 20 '22 18:10 chalasr

I won't garantee I'll do it but I'll take a look. (I started to make my own implementation of oauth2-server for my current project though)

etshy avatar Oct 20 '22 18:10 etshy

I accidentally deleted my previous comment.


@etshy

What do you think about using:

For Tokens

For clients

  • Implement them in an ordinary way
  • Set up filters to validate and authenticate clients.

imdhemy avatar Oct 21 '22 09:10 imdhemy

@imdhemy You mean for my implementation ? I already choose to use Lexik bundle to create the token, and add data to it. I didn't know about the RefreshTokenBundle though, thanks a lot.

etshy avatar Oct 24 '22 11:10 etshy

I won't garantee I'll do it but I'll take a look. (I started to make my own implementation of oauth2-server for my current project though)

Hi, is there something new in support ODM please? thanks

spiider8 avatar May 24 '23 14:05 spiider8

Hi. No sorry I put the project I planned to make a oauthserver for on hold so I didn't do anything about it yet.

etshy avatar May 24 '23 15:05 etshy

I quickly took a look at this tonight and as a complete newbie with Bundle, I'm a bit lost. Should I add both ORM and ODM compilerPass or should I move that to the prepend to be able to load only one base on the Configuration ? I made some few tests but adding CompilerPass in the prepend doesn't seem to be working at all though.

So I guess I should load both and in the configureDoctrinePersistence I replace argument by entityManager or documentManager depending on the Configuration.

Another thing, Should I rework the Driver to replace it by files Mapping (XML ?) ? I saw in the DoctrineOrmMappingsPass that "You should not directly instantiate this class but use one of the factory methods."

etshy avatar Jul 03 '23 20:07 etshy