Skip to content

Commit

Permalink
Merge pull request #9 from chadicus/fea/authorize-phpdoc
Browse files Browse the repository at this point in the history
Fea/authorize phpdoc
  • Loading branch information
chadicus committed Sep 22, 2015
2 parents fc6a584 + 95294ea commit b4aca53
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions src/Authorize.php
Expand Up @@ -10,17 +10,46 @@ class Authorize
{
const ROUTE = '/authorize';

/**
* The slim framework application instance.
*
* @var Slim
*/
private $slim;

/**
* The oauth2 server imstance.
*
* @var OAuth2\Server
*/
private $server;

/**
* The template for /authorize
*
* @var string
*/
private $template;

/**
* Construct a new instance of Authorize.
*
* @param Slim $slim The slim framework application instance.
* @param OAuth2\Server $server The oauth2 server imstance.
* @param string $template The template for /authorize
*/
public function __construct(Slim $slim, OAuth2\Server $server, $template = 'authorize.phtml')
{
$this->slim = $slim;
$this->server = $server;
$this->template = $template;
}

/**
* Call this class as a function.
*
* @return void
*/
public function __invoke()
{
$request = MessageBridge::newOAuth2Request($this->slim->request());
Expand All @@ -46,8 +75,9 @@ public function __invoke()
/**
* Register this route with the given Slim application and OAuth2 server
*
* @param Slim $slim The slim framework application instance.
* @param OAuth2\Server $server The oauth2 server imstance.
* @param Slim $slim The slim framework application instance.
* @param OAuth2\Server $server The oauth2 server imstance.
* @param string $template The template for /authorize
*
* @return void
*/
Expand Down

0 comments on commit b4aca53

Please sign in to comment.