Skip to content

Soapbox/authorize-twitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Authorize-Twitter

Authorize strategy for Twitter authentication.

Getting Started

  • Install Authorize into your application to use this Strategy.

Installation

Add the following to your composer.json

"require": {
	...
	"soapbox/authorize-twitter": "dev-master",
	...
}

app/config/app.php

Add the following to your app.php, note this will be removed in future versions since it couples us with Laravel, and it isn't required for the library to function

'providers' => array(
	...
	"SoapBox\AuthorizeTwitter\AuthorizeTwitterServiceProvider",
	...
)

Usage

Login

use SoapBox\Authroize\Authenticator;
use SoapBox\Authorize\Exceptions\InvalidStrategyException;
...
$settings = [
	...
];

$strategy = new Authenticator('twitter', $settings);

$user = $strategy->authenticate($parameters);

Endpoint

use SoapBox\Authroize\Authenticator;
use SoapBox\Authorize\Exceptions\InvalidStrategyException;
...
$settings = [
	...
];

$strategy = new Authenticator('twitter', $settings);
$user = $strategy->endpoint();