Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

oAuth with PHP (for google api)

Tags:

php

oauth

How to use oAuth with PHP ? I can't install oauth class with pecl because I'm using share hosting.

I found

http://code.google.com/p/oauth-php/

but there is no example for client. I want to use oauth for Google API.

like image 421
saturngod Avatar asked Jan 18 '10 05:01

saturngod


People also ask

What is OAuth2 PHP?

league/oauth2-server is a standards compliant implementation of an OAuth 2.0 authorization server written in PHP which makes working with OAuth 2.0 trivial. You can easily configure an OAuth 2.0 server to protect your API with access tokens, or allow clients to request new access tokens and refresh them.


2 Answers

Here is your example: http://code.google.com/p/oauth-php/wiki/ConsumerHowTo

You can also read through http://code.google.com/apis/gdata/docs/auth/oauth.html to find out the specifics on Google.

like image 189
James Hartig Avatar answered Sep 28 '22 19:09

James Hartig


I got it and I develop my own client library base on http://googlecodesamples.com/oauth_playground/ (svn sourcecode)

like image 27
saturngod Avatar answered Sep 28 '22 19:09

saturngod