Proposal for "HTTP_OAuth2"

» Metadata » Status
  • Status: Draft
» Description
An implemention of OAuth Spec v2 draft_08
http://tools.ietf.org/html/draft-ietf-oauth-v2-08 />
install:
---------------------------
pear install HTTP_OAuth2-0.0.1.tgz

* note: json and http extensions are require


test:
---------------------------
copy <$PEAR/docs/HTTP_OAuth2/examples/*> to your web root directory
edit: <$WEBROOT/test_conf.php> file to adapt your system env
run: <php $WEBROOT/server/init.php> to initialize some required data
test: <php $WEBROOT/client/browser.php> and have fun :)

design & idea:
---------------------------
the initiative is to simplify the construct work of authorize/token/resource endpoint and isolate the storage/authentication level under oauth2 protocal framework.
what we have to do would be like as follows:
1, implement a concrete class of HTTP_OAuth2_Server_Storage_Abstract, say My_Storage class // refer to HTTP_OAuth2_Server_Storage_Mock as an simple but functional example
2, $mystore = new My_Storage(); // create an new instance of My_Storage class
3, $token_endpoint = new HTTP_OAuth2_Server_EndPoint_Token($config,$mystore); // create an endpoint handler with the storage object
4, $token_endpoint->handle() // just wait and do the access token request, and that's all

after all, all that we have to do significantly is to implement a storage interface, which is very specific to your application design & server enviroment.

-------------------------
any comments and feedbacks are welcome, please feel free to contact me if you found some bugs or inconsistencies with spec.

not 100% done, sure, the spec is still in draft stage, so not everything is settled down. but, the main framework and functionality are ready for further development and package proposal, hope this package can help in someway.

ok, thanks for you time reading and tring.
» Dependencies » Links
  • http,json extensions are required
» Timeline » Changelog
  • First Draft: 2010-06-16