OAuth stack middleware.
PHP
Latest commit 2d5cf00 Jul 3, 2014 @simensen simensen Merge pull request #7 from simensen/phpunit
Add phpunit and update deps.
Permalink
Failed to load latest commit information.
src/Igorw/Stack Added token_translator and STACK-2 compat Nov 13, 2013
tests init Feb 23, 2013
.gitignore init Feb 23, 2013
LICENSE init Feb 23, 2013
README.md Typo Jan 5, 2014
composer.json Loosen phpunit restrictions. Nov 13, 2013
composer.lock Loosen phpunit restrictions. Nov 13, 2013
example.php Introduce Igorw sub-namespace Jul 30, 2013
phpunit.xml.dist init Feb 23, 2013

README.md

Stack/OAuth

OAuth stack middleware.

Requirements

  • session: The request must have session handling accounted for. You can do this by prepending the stack/session middleware to this one.

  • credentials: You need to have some sort of OAuth server. By default, stack/oauth will use twitter. But you can change that through the oauth_service.class config parameter.

Usage

use Igorw\Stack\OAuth;

$app = new OAuth($app, [
    'key'           => 'foo',
    'secret'        => 'bar',
    'callback_url'  => 'http://localhost:8080/auth/verify',
    'success_url'   => '/',
    'failure_url'   => '/auth',
]);

Pre-defined URLs

  • /auth
  • /auth/verify

TODO

  • config validation
  • tests
  • more flexible path config (?)