uafrica / oauth-server

OAuth Server
Other
51 stars 51 forks source link

How to use Oauth for Server to Server as Google do #17

Open surjit opened 9 years ago

surjit commented 9 years ago

How to use OAuth for server to server as below ?

https://github.com/surjit/google-api-php-client

$client = new Google_Client(); $client->setApplicationName("Client_Library_Examples"); $client->setDeveloperKey("YOUR_APP_KEY");

$service = new Google_Service_Books($client); $optParams = array('filter' => 'free-ebooks'); $results = $service->volumes->listVolumes('Henry David Thoreau', $optParams);

foreach ($results as $item) { echo $item['volumeInfo']['title'], "
\n"; }

surjit commented 9 years ago

two legged oauth example

dakota commented 9 years ago

I'm not sure what you are asking. The link you provided is for a Google API client, this plugin does not interface with Google APIs in any way, but rather allows you to implement your own OAuth2 server for your own API.