OAuth Server And Consumer in PHP

Here is the full implementation of OAuth for anyMeta. For now we publish this as a direct export from our svn repository. It includes full server and client code, including database tables for the storage of tokens and consumer keys. It also includes optional request logging and smarty templates. It has been tested with PHP 5.2.

We have successfully tested this implementation against itself (try it on the Mediamatic OAuth Test Server) and Andy's test server and client.

The code is released under the GPL v2.

Files

The repository contains the following files:

OAuth.mod.php

This is the anyMeta module. All methods starting with httpRequest_ are controllers for a website.

templates/

This directory contains the templates we use. These are Smarty templates and use some tricks provided by anyMeta.

test/

Contains a simple test script. It implements (almost) all tests provided on wiki.oauth.net/TestCases

core/

This directory contains all classes implementing the support for OAuth. In the file OAuth.mod.php you can see how the classes are used.

core/OAuthRequest.php

This is the main class. It wraps either the current request or a request given to the constructor. It provides all basic functionality for calculating the base string, signatures etc.

core/OAuthStore.php

The storage module for OAuth. This file needs some work before it is portable to other systems than anyMeta. It makes use of our database functions, though replacing those calls shouldn't be too hard.

core/OAuthException.php

The exception class for OAuth. Works together with OAuthRequestLogger to enable debugging of OAuth request from and to the server.

core/OAuthRequestSigner.php

Implements methods to sign requests to OAuth servers.

core/OAuthRequester.php

Extends the OAuthRequestSigner class to actually do signed requests to OAuth servers and returning the results. Also implements code to request tokens from OAuth servers.

core/OAuthRequesterLogger.php

Logs all incoming and outgoing requests in a database table. Facilitates debugging of the requests.

core/OAuthVerifier.php

Implements verification of incoming requests.

core/OAuthServer.php

Implements support for handling token requests and authorization of request tokens.

Updates

2008-01-29 (r33366)
• Added support for body signing using xoauth_body_signature
• Added interface to make a test request

2007-12-10 (r32730)
• Added debug menu and request logging (optional)

2007-12-06 (r32654)
• Added debug setting to show keys and secrets
• Fixed logon when succesfully verfied signed request

2007-12-03 (r32597)
OAuthStore Fixed MySQL 4.1.x incompatibility
OAuthStore Fixed SQL error (missing comma)

downloads

code php download opensource technical gpl anymeta software mediamatic library

oauth-php - Google Code

A PHP library for OAuth consumers and servers. Complete with an extensible OAuth store, includi...

Verso Wiki: translate Wiki markup to HTML and HTML to Wiki markup

Verso Wiki is a Wiki to HTML and HTML to Wiki markup translator. We use this W...

Depcached - memcache(d) with dependencies

When using memcache we bumped into some problems. The major one was that we needed to invalidate...

OAuth - Added Body Signing

I just published a new version of our OAuth server and consumer code. The major addition to thi...

Securing your site against code injections

All Internet applications have to secure their inner workings against attacks from outside. We a...

mmcached - a hierarchical extension to memcached

There is a new and better version of this memcached clone. Please check ou...

Sorting Digital Photos

More and more people collect a growing mountain of digital photos. I try to manage that nice mo...

Facebook Developers | Thrift

Thrift is a software framework for scalable cross-language services development. It combines a po...

opensource download php code technical gpl anymeta mediamatic software c

oauth-php - Google Code

A PHP library for OAuth consumers and servers. Complete with an extensible OAuth store, includi...

Verso Wiki: translate Wiki markup to HTML and HTML to Wiki markup

Verso Wiki is a Wiki to HTML and HTML to Wiki markup translator. We use this W...

Depcached - memcache(d) with dependencies

When using memcache we bumped into some problems. The major one was that we needed to invalidate...

OAuth - Added Body Signing

I just published a new version of our OAuth server and consumer code. The major addition to thi...

Sorting Digital Photos

More and more people collect a growing mountain of digital photos. I try to manage that nice mo...

Facebook Developers | Thrift

Thrift is a software framework for scalable cross-language services development. It combines a po...

oauth technical mediamatic anymeta code protocol download api authentication opensource

oauth-php - Google Code

A PHP library for OAuth consumers and servers. Complete with an extensible OAuth store, includi...

OAuth - Added Body Signing

I just published a new version of our OAuth server and consumer code. The major addition to thi...

OAuth - API Authentication

An open protocol to allow secure API authentication in a simple and standard method from desktop ...

OAuth wiki / TestCases

Here are test cases for OAuth algorithms.

An open protocol to allow secure API authentica...

software opensource php technical code download Marc's Blog droplet anymeta manage

OAuth - Added Body Signing

I just published a new version of our OAuth server and consumer code. The major addition to thi...

Sorting Digital Photos

More and more people collect a growing mountain of digital photos. I try to manage that nice mo...

Facebook Developers | Thrift

Thrift is a software framework for scalable cross-language services development. It combines a po...

MarcWorrell.com/ created on 2007-11-30 17:16:05/ modified on 2008-01-29 13:39:07/ mail me at