Skip to content
 
 

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors