Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Fuel Oauth Provider package.
  • Hi guys, have coded up a little oauth provider package for fuel php. All code is on github as a working example: You may notice there are a lot of things outside of the package i.e. Models for oauth consumer, nonce and tokens, I'm not sure of the best way to implement the database stuff inside the package / or complete abstraction, but if anyone else has any ideas please do share.
  • Thanks for the OAuth package. Trying to implement it, but without proper knowledge without any success.
    Quite a new for this great framework and also OAuth principles. Could anyone please share some controller examples for OAuth?
    Even some existing code could be fine, just to catch how it works.
    Thank you
  • Alright sir, I have put this up on github as a full fuel install because there is no docs as such, it's really a v0.1 that I just wrote to get it working as such. I will be continuing development and try and package things up a bit better, but feel free to go ahead and use away, fire any issues you have up on github and I'll get them sorted out. First thing you will need is a test oauth client to get started off, I've attached 3 simple files I've been using in this dropbox link: Next register as a user '/oauth/register' and setup an oauth consumer in the database for your test client. You'll then want to point your client towards: to get a request_token, then as long as your client passes the callback uri to this page you'll be able to go through the login process. Make sure you have all the database tables setup as in the readme on github and all authentication should go fine. Once your authenticated you'll see an example controller in: /v1/user/profile This just gets the current user ID from the provider and then does a database lookup to get the users details. Theres nothing written yet for enabling different formats (I'm just using json_decode right now) or REST, but if you fancy contributing please fork away and send a pull request.
    Need any more details give me a shout.
  • Hey, nice job, I wanted to add, that Philsturgeon also made some progress on oauth and oauth2 in case you did not know yet": Good luck and thanks for sharing :)
  • Thanks man! Yeah have seen Phil's packages, have thought about putting this into the oauth package just not entirely sure how to bring the oauth server one down into a single package whilst retaining the models for oauth_consumer, nonce and tokens. Any advice or thoughts on ways to implement this better are appreciated.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion