Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make my own api with oauth

Tags:

php

oauth

api

Hy ,

I want to make my own api (api.mysite.com).
But i want to secure it with OAuth.
I couldn`t find a good tutorial on how to implement it.

I would like something like this:

On api.mysite.com to be the files for oauth :

-where user sends the signed request and i return him the needed data (first send him something like 1 or 0).

And on localhost/testapi to be the file index.php:
-where user signs the request and sends it to api.mysite.com where it is processed and returns the result if it`s all ok

Where could i find the best tutorial that explains what to put on api.mysite.com , what to put in localhost/testapi and the sql structure?

Thank you and sorry for my dumbness

like image 341
Razvan Avatar asked Jul 11 '12 08:07

Razvan


1 Answers

Some useful links:

  • standard-compliant implementation of oauth2 provider in php
  • a tutorial
  • also, search stackoverflow, there were questions like yours before
like image 60
Sergey Eremin Avatar answered Oct 19 '22 13:10

Sergey Eremin