Comments (10)
Yes, a backend (such as MySQL) is required. This is by design and difficult to
change, although it is conceivable to write a new store that uses _SESSION or
plain
files.
OTOH, PECL::OAuth (http://pecl.php.net/package/oauth) is a good option for
consumers.
It depends on libcurl, but has no database dependencies.
Original comment by brunobg%[email protected]
on 6 Feb 2010 at 4:43
- Changed state: Accepted
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from oauth-php.
Original comment by brunobg%[email protected]
on 6 Feb 2010 at 5:04
- Added labels: Priority-Low
- Removed labels: Priority-Medium
from oauth-php.
From a comment by @a4amitarora:
There doesn't seem to be an easy way to adapt this for 2-legged variation of
OAuth.
The 2-legged OAuth doesn't require a request token or an access token. The
request
should be signed just using consumer key and consumer secret (using blank value
for
access token in signature base string, and blank value for access secret in
HMAC-SHA1
algorithm key - for HMAC-SHA1 case in particular). So, this case doesn't
require the
complexity of OAuthStore at all; rather a simple additional constructor for
OAuthRequester class that accepts request URL, HTTP Method, request params,
consumer
key and consumer secret should suffice. Once that's done, one can easily use
this
library for 2-legged OAuth scenario as well while avoiding steps 1 to 4 which
aren't
required for that case.
Original comment by brunobg%[email protected]
on 18 Feb 2010 at 5:36
from oauth-php.
I solved the problem by creating an OAuthStore2Leg that just stores the key and
secret. It only involved implementing the constructor and the
getSecretsForSignature
method. It is attached if you would find it useful.
Original comment by [email protected]
on 26 Feb 2010 at 5:33
Attachments:
from oauth-php.
@ben.hesketh: Thanks a lot!! I just commited your file to the SVN and I'm going
to
update the wiki.
Original comment by brunobg%[email protected]
on 26 Feb 2010 at 8:48
- Changed state: Fixed
from oauth-php.
No problem, thanks for creating this library :)
Original comment by [email protected]
on 26 Feb 2010 at 8:59
from oauth-php.
@ben.hesketh: would you mind checking the wiki (consumer page) to see if I
missed
anything? There's a new session on 2-legged oauth at the bottom. Thanks!
Original comment by brunobg%[email protected]
on 26 Feb 2010 at 9:01
from oauth-php.
Looks good. I've attached a sample of the code I used to test the store if you
want
to put up a complete example.
Original comment by [email protected]
on 26 Feb 2010 at 9:09
Attachments:
from oauth-php.
Just added it. May I also add it to the source repository under the MIT license?
Original comment by brunobg%[email protected]
on 26 Feb 2010 at 9:21
from oauth-php.
Of course, I forgot to put the license on the top.
Original comment by [email protected]
on 26 Feb 2010 at 9:23
from oauth-php.
Related Issues (20)
- Example server code does not seem to be storing session for testing HOT 3
- OAuthStoreAnyMeta references out-of-project include HOT 1
- Signed request with trailing & on url HOT 3
- OAuthRequest.php: No Hostname/Port detected when using http://localhost:8888/Bla/index.php, for example. HOT 2
- Remove $_SESSION dependency HOT 17
- Add some very simple DB wrapper so we can use mysqli or PDO instead of mysql_* HOT 47
- Verification of signature failed when query string is included in oAuth Request HOT 2
- Can unzip .tar.gz HOT 1
- Incompatible with PECL's OAuth HOT 1
- Support for MySQLi HOT 1
- osr_callback_uri is never read HOT 1
- Improper OAuthException22 referenced in OAuthStoreMySQL HOT 1
- RSA-SHA1 becomes RSA_SHA1 when sent to server HOT 1
- Undefined index 'host' in OAuthRequest on line 513 HOT 1
- Fatal error: Class 'OAuthException22' not found HOT 2
- Get client ID or consumer_key from OAuthRequestVerifier HOT 2
- No support for duplicate consumer keys
- OAuth Core 1.0 Revision A Compatibility HOT 25
- Content-Type missed in POST HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oauth-php.