Cheetah
Public Member Functions | Public Attributes | List of all members
OAuth2\Controller\AuthorizeControllerInterface Interface Reference
Inheritance diagram for OAuth2\Controller\AuthorizeControllerInterface:
OAuth2\Controller\AuthorizeController OAuth2\Server OAuth2\OpenID\Controller\AuthorizeController

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'
 

Detailed Description

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.

Member Function Documentation

◆ handleAuthorizeRequest()

OAuth2\Controller\AuthorizeControllerInterface::handleAuthorizeRequest ( RequestInterface  $request,
ResponseInterface  $response,
  $is_authorized,
  $user_id = null 
)

◆ validateAuthorizeRequest()

OAuth2\Controller\AuthorizeControllerInterface::validateAuthorizeRequest ( RequestInterface  $request,
ResponseInterface  $response 
)

Member Data Documentation

◆ RESPONSE_TYPE_ACCESS_TOKEN

const OAuth2\Controller\AuthorizeControllerInterface::RESPONSE_TYPE_ACCESS_TOKEN = 'token'

Definition at line 38 of file AuthorizeControllerInterface.php.

◆ RESPONSE_TYPE_AUTHORIZATION_CODE

const OAuth2\Controller\AuthorizeControllerInterface::RESPONSE_TYPE_AUTHORIZATION_CODE = 'code'

Definition at line 37 of file AuthorizeControllerInterface.php.


The documentation for this interface was generated from the following file: