0

I am working on a plugin in CakePHP3 and I need to create a simply Oauth 2.0 Server API that allows to do a simple CRUD on the users' table and create sessions when needed.

I have done some research here in StackOverflow and it seems that the best choice would be https://github.com/uafrica/oauth-server

Now, I have tried to make it work according to the doc in the repository but since it will be a plugin, not the core of the application I do not understand how it is supposed to work and which file I need to update.

Would somebody be so kind to give me the list of steps I need to follow and the actual files that need to be updated?

Many Thanks in advance

Nico Anastasio
  • 144
  • 1
  • 11

1 Answers1

1

The uafrica/oauth-server project is woefully out of date. It requires v4.1 of league/oauth2-server, which is now currently at v7.2. Version 5 of that project was completely rewritten and is not backwards compatible with v4.x.

I don't think there's an out-of-the-box CakePHP 3 plugin that works with the current version of league/oauth2-server.

You'll have to either build your own plugin from scratch, or try to hack the uafrica/oauth-server project to get it work with league/oauth2-server.

  • Hi Scott, Thanks for your response. Do you know any other package I can use, or a easy solution to implement it and to solve my problem – Nico Anastasio Jul 26 '18 at 16:56
  • An alternative could also be Json web token, what do you think about it? – Nico Anastasio Jul 26 '18 at 17:06
  • I have not used Json web token. If I were in your shoes, I would build something simple with the league/oauth2-server package. There's tons of documentation on it. https://oauth2.thephpleague.com/ – Scott Spuler Jul 26 '18 at 17:56