api-module A PHP library for OAuth 1.0a consumers and servers.

  1. Feature
  2. Requirements
  3. Usage
  4. Resources

...built your oauth server by yii。 ...

  • include oauth-php
  • support web(oauth) and app(xauth) 。

Feature

  • programer join and manager
  • oauth/authorize 请求用户授权Token
  • oauth/access_token 获取授权过的Request Token
  • oauth/access_token 获取授权过的Access Token

Requirements

...Yii 1.1.8 or above ...

Usage

...1. config the oauth server ...

// application components
	'components'=>array(
		......
		'urlManager'=>array(
		    //it must be path model
		     'urlFormat'=>'path',
		    //hidden index.php
		    'showScriptName'=>false,
		),
		......
	),
	// application modules
	'modules'=>array(
            ......
	    'api'=>array(
                'connectionString' => 'mysql:host=localhost;port=3306;dbname=yiisns',
                'username' => 'root',
                'password' => '111111',
            ),
            ......
	),

...2. install oauth.sql (locate:modules\api\data\oauth.sql)...

...3. create you oauth store accout at “oauth_server_registry” ... ~~~ [mysql] INSERT INTO oauth_server_registry (osr_id, osr_usa_id_ref, osr_consumer_key, osr_consumer_secret, osr_enabled, osr_status, osr_requester_name, osr_requester_email, osr_callback_uri, osr_application_uri, osr_application_title, osr_application_descr, osr_application_notes, osr_application_type, osr_application_commercial, osr_issue_date, osr_timestamp) VALUES (1, 1, 'admin', '123456', 1, 'active', 'biner', 'huanghuibin@gmail.com', 'b.php', 'a.php', 'oauth测试标题', '这是个非常helloworld的描述', '笔记?', 'system', 0, '2011-09-20 17:35:50', '2011-09-20 17:35:50'), ~~~

Resources

...external resources for this extension...

5 0
17 followers
1 329 downloads
Yii Version: 1.1
License: MIT
Category: Web Service
Developed by: biner
Created on: Nov 25, 2011
Last updated: 12 years ago

Downloads

show all