Skip to content

aykutfarsak/php-2-legged-oauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example implementation of 2-legged OAuth with Silex (Inspired from Designing a Secure REST (Web) API without OAuth)

Build Status

Installation

With Composer, install all dependencies.

curl -s https://getcomposer.org/installer | php
php composer.phar install

Usage

Set api clients to config.php

Hash::setClients(array(
    'A_CLIENT'       => 'A_CLIENT_SECRET_KEY',
    'ANOTHER_CLIENT' => 'ANOTHER_CLIENT_SECRET_KEY',
));

API design is in the api.php. Change routes according to your needs. But don't remove hash validation middleware. Then check index.php to see how make an api call.

About

Example implementation of 2-legged OAuth

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages