aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/bshaffer/oauth2-server-php/src/OAuth2/Controller/AuthorizeControllerInterface.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-12-18 15:48:49 +0100
committerMario Vavti <mario@mariovavti.com>2017-12-18 15:48:49 +0100
commit439d41b194073285ab97be94253b3f4cb4395e43 (patch)
tree272d4c64ea2d766235ecb41009117b5269f8cdfd /vendor/bshaffer/oauth2-server-php/src/OAuth2/Controller/AuthorizeControllerInterface.php
parent08a8f195e749a120642f6c486c1dad62a73924d1 (diff)
downloadvolse-hubzilla-439d41b194073285ab97be94253b3f4cb4395e43.tar.gz
volse-hubzilla-439d41b194073285ab97be94253b3f4cb4395e43.tar.bz2
volse-hubzilla-439d41b194073285ab97be94253b3f4cb4395e43.zip
install smarty via composer and update other php libs
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);
}