igorw / stack-oauth
OAuth stack middleware.
Installs: 59
Dependents: 1
Suggesters: 0
Security: 0
Stars: 38
Watchers: 9
Forks: 7
Open Issues: 2
pkg:composer/igorw/stack-oauth
Requires
- php: >=5.4.0
- lusitanian/oauth: 0.1.*
- pimple/pimple: ~1.0@dev
- symfony/http-foundation: ~2.1
- symfony/http-kernel: ~2.1
Requires (Dev)
- phpunit/phpunit: 3.7.*
- silex/silex: ~1.0@dev
- stack/builder: ~1.0@dev
- stack/callable-http-kernel: ~1.0@dev
- stack/session: ~1.0@dev
Suggests
- stack/session: ~1.0@dev
This package is not auto-updated.
Last update: 2025-10-20 19:49:51 UTC
README
OAuth stack middleware.
Requirements
- 
session: The request must have session handling accounted for. You can do this by prepending the stack/sessionmiddleware to this one.
- 
credentials: You need to have some sort of OAuth server. By default, stack/oauthwill use twitter. But you can change that through theoauth_service.classconfig 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 (?)