Cheetah
|
Public Member Functions | |
handleAuthorizeRequest (RequestInterface $request, ResponseInterface $response, $is_authorized, $user_id=null) | |
validateAuthorizeRequest (RequestInterface $request, ResponseInterface $response) | |
Public Attributes | |
const | RESPONSE_TYPE_AUTHORIZATION_CODE = 'code' |
const | RESPONSE_TYPE_ACCESS_TOKEN = 'token' |
This controller is called when a user should be authorized by an authorization server. As OAuth2 does not handle 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();
Definition at line 26 of file AuthorizeControllerInterface.php.
OAuth2\Controller\AuthorizeControllerInterface::handleAuthorizeRequest | ( | RequestInterface | $request, |
ResponseInterface | $response, | ||
$is_authorized, | |||
$user_id = null |
|||
) |
Implemented in OAuth2\Server, and OAuth2\Controller\AuthorizeController.
OAuth2\Controller\AuthorizeControllerInterface::validateAuthorizeRequest | ( | RequestInterface | $request, |
ResponseInterface | $response | ||
) |
Implemented in OAuth2\Server, OAuth2\OpenID\Controller\AuthorizeController, and OAuth2\Controller\AuthorizeController.
const OAuth2\Controller\AuthorizeControllerInterface::RESPONSE_TYPE_ACCESS_TOKEN = 'token' |
Definition at line 38 of file AuthorizeControllerInterface.php.
const OAuth2\Controller\AuthorizeControllerInterface::RESPONSE_TYPE_AUTHORIZATION_CODE = 'code' |
Definition at line 37 of file AuthorizeControllerInterface.php.