aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/bshaffer/oauth2-server-php/src/OAuth2/Controller/AuthorizeControllerInterface.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/bshaffer/oauth2-server-php/src/OAuth2/Controller/AuthorizeControllerInterface.php')
-rw-r--r--vendor/bshaffer/oauth2-server-php/src/OAuth2/Controller/AuthorizeControllerInterface.php37
1 files changed, 26 insertions, 11 deletions
diff --git a/vendor/bshaffer/oauth2-server-php/src/OAuth2/Controller/AuthorizeControllerInterface.php b/vendor/bshaffer/oauth2-server-php/src/OAuth2/Controller/AuthorizeControllerInterface.php
index fa07ae8d2..f758f976a 100644
--- a/vendor/bshaffer/oauth2-server-php/src/OAuth2/Controller/AuthorizeControllerInterface.php
+++ b/vendor/bshaffer/oauth2-server-php/src/OAuth2/Controller/AuthorizeControllerInterface.php
@@ -11,17 +11,18 @@ use OAuth2\ResponseInterface;
* authorization directly, this controller ensures the request is valid, but
* requires the application to determine the value of $is_authorized
*
- * ex:
- * > $user_id = $this->somehowDetermineUserId();
- * > $is_authorized = $this->somehowDetermineUserAuthorization();
- * > $response = new OAuth2\Response();
- * > $authorizeController->handleAuthorizeRequest(
- * > OAuth2\Request::createFromGlobals(),
- * > $response,
- * > $is_authorized,
- * > $user_id);
- * > $response->send();
- *
+ * @code
+ * $user_id = $this->somehowDetermineUserId();
+ * $is_authorized = $this->somehowDetermineUserAuthorization();
+ * $response = new OAuth2\Response();
+ * $authorizeController->handleAuthorizeRequest(
+ * OAuth2\Request::createFromGlobals(),
+ * $response,
+ * $is_authorized,
+ * $user_id
+ * );
+ * $response->send();
+ * @endcode
*/
interface AuthorizeControllerInterface
{
@@ -37,7 +38,21 @@ interface AuthorizeControllerInterface
const RESPONSE_TYPE_AUTHORIZATION_CODE = 'code';
const RESPONSE_TYPE_ACCESS_TOKEN = 'token';
+ /**
+ * Handle the OAuth request
+ *
+ * @param RequestInterface $request
+ * @param ResponseInterface $response
+ * @param $is_authorized
+ * @param null $user_id
+ * @return mixed
+ */
public function handleAuthorizeRequest(RequestInterface $request, ResponseInterface $response, $is_authorized, $user_id = null);
+ /**
+ * @param RequestInterface $request
+ * @param ResponseInterface $response
+ * @return bool
+ */
public function validateAuthorizeRequest(RequestInterface $request, ResponseInterface $response);
}