diff --git a/src/Authorize.php b/src/Authorize.php index 040d39a..5efb93f 100644 --- a/src/Authorize.php +++ b/src/Authorize.php @@ -10,10 +10,34 @@ 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; @@ -21,6 +45,11 @@ public function __construct(Slim $slim, OAuth2\Server $server, $template = 'auth $this->template = $template; } + /** + * Call this class as a function. + * + * @return void + */ public function __invoke() { $request = MessageBridge::newOAuth2Request($this->slim->request()); @@ -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 */