2017 © Pedro Peláez
 

library stack-oauth

OAuth stack middleware.

image

igorw/stack-oauth

OAuth stack middleware.

  • Thursday, July 3, 2014
  • by igorw
  • Repository
  • 10 Watchers
  • 38 Stars
  • 53 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 7 Forks
  • 3 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Stack/OAuth

OAuth stack middleware., (*1)

Requirements

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

  • 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., (*3)

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 (?)

The Versions