Skip to content
ceeram edited this page Mar 24, 2014 · 2 revisions

Opauth logo

Opauth is a multi-provider authentication framework for PHP.

Alpha version: 1.0-alpha

Documentation is also a work in progress and incomplete

Installation

Pick and choose your favorite installation method:

###i. Via Composer

Composer is a dependency manager for PHP.

To install Opauth core only, include opauth/opauth to your composer.json:

{
    "require":{
        "opauth/opauth": "dev-wip/1.0"
    }
}

Opauth requires strategies to work. We suggest that you add these packages as well for Facebook, Google and/or Twitter authentication support.

{
    "require":{
        "opauth/opauth": "dev-wip/1.0",
        "opauth/facebook": "dev-wip/1.0",
        "opauth/google": "dev-wip/1.0",
        "opauth/twitter": "dev-wip/1.0"
    }
}

Run php composer.phar install

###ii. Manual download

Not recommended, will be updated later

If you prefer git clone, you can simply run the following without worrying about renaming:

Not recommended, will be updated later

Note: You can have Strategy/ directory anywhere in your system. All you have to do is explicitly define strategy_dir in your Opauth configuration.

No longer valid, will be updated later

###iii. As plugin on other PHP frameworks If you are using any of the following PHP frameworks, you can install Opauth as a plugin or extension. Follow the instructions at the respective packages:

No 1.0-alpha extensions available yet

Made a plugin? Edit this wiki and add yours!

Using Opauth (composer users only, will be updated)

NB. Make sure you have already required the composer autoload.php

  1. Load Opauth configuration as an array.

  2. Instantiate Opauth by passing the configuration.()

<?php
$Opauth = new Opauth\Opauth\Opauth($config);
$data = $Opauth->run();
  1. Direct all authentication traffic to the Opauth instance.

All of the above are also implemented as an example in the example/ directory for your reference.

Out of date, will be updated later!!