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

Public Member Functions

 __construct (ClientInterface $clientStorage, array $responseTypes=array(), array $config=array(), ScopeInterface $scopeUtil=null)
 
 handleAuthorizeRequest (RequestInterface $request, ResponseInterface $response, $is_authorized, $user_id=null)
 
 validateAuthorizeRequest (RequestInterface $request, ResponseInterface $response)
 
 getScope ()
 
 getState ()
 
 getClientId ()
 
 getRedirectUri ()
 
 getResponseType ()
 

Protected Member Functions

 setNotAuthorizedResponse (RequestInterface $request, ResponseInterface $response, $redirect_uri, $user_id=null)
 
 buildAuthorizeParameters ($request, $response, $user_id)
 
 getValidResponseTypes ()
 
 validateRedirectUri ($inputUri, $registeredUriString)
 

Protected Attributes

 $clientStorage
 
 $responseTypes
 
 $config
 
 $scopeUtil
 

Additional Inherited Members

- Public Attributes inherited from OAuth2\Controller\AuthorizeControllerInterface
const RESPONSE_TYPE_AUTHORIZATION_CODE = 'code'
 
const RESPONSE_TYPE_ACCESS_TOKEN = 'token'
 

Detailed Description

See also
OAuth2\Controller\AuthorizeControllerInterface

Definition at line 14 of file AuthorizeController.php.

Constructor & Destructor Documentation

◆ __construct()

OAuth2\Controller\AuthorizeController::__construct ( ClientInterface  $clientStorage,
array  $responseTypes = array(),
array  $config = array(),
ScopeInterface  $scopeUtil = null 
)
Parameters
OAuth2\Storage\ClientInterface$clientStorageREQUIRED Instance of OAuth2\Storage\ClientInterface to retrieve client information
array$responseTypesOPTIONAL Array of OAuth2\ResponseType\ResponseTypeInterface objects. Valid array keys are "code" and "token"
array$configOPTIONAL Configuration options for the server $config = array( 'allow_implicit' => false, // if the controller should allow the "implicit" grant type 'enforce_state' => true // if the controller should require the "state" parameter 'require_exact_redirect_uri' => true, // if the controller should require an exact match on the "redirect_uri" parameter 'redirect_status_code' => 302, // HTTP status code to use for redirect responses );
OAuth2\ScopeInterface$scopeUtilOPTIONAL Instance of OAuth2\ScopeInterface to validate the requested scope

Definition at line 42 of file AuthorizeController.php.

Member Function Documentation

◆ buildAuthorizeParameters()

OAuth2\Controller\AuthorizeController::buildAuthorizeParameters (   $request,
  $response,
  $user_id 
)
protected

Reimplemented in OAuth2\OpenID\Controller\AuthorizeController.

Definition at line 115 of file AuthorizeController.php.

◆ getClientId()

OAuth2\Controller\AuthorizeController::getClientId ( )

Definition at line 369 of file AuthorizeController.php.

◆ getRedirectUri()

OAuth2\Controller\AuthorizeController::getRedirectUri ( )

Definition at line 374 of file AuthorizeController.php.

◆ getResponseType()

OAuth2\Controller\AuthorizeController::getResponseType ( )

Definition at line 379 of file AuthorizeController.php.

◆ getScope()

OAuth2\Controller\AuthorizeController::getScope ( )

Convenience methods to access the parameters derived from the validated request

Definition at line 359 of file AuthorizeController.php.

◆ getState()

OAuth2\Controller\AuthorizeController::getState ( )

Definition at line 364 of file AuthorizeController.php.

◆ getValidResponseTypes()

OAuth2\Controller\AuthorizeController::getValidResponseTypes ( )
protected

Reimplemented in OAuth2\OpenID\Controller\AuthorizeController.

Definition at line 313 of file AuthorizeController.php.

◆ handleAuthorizeRequest()

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

◆ setNotAuthorizedResponse()

OAuth2\Controller\AuthorizeController::setNotAuthorizedResponse ( RequestInterface  $request,
ResponseInterface  $response,
  $redirect_uri,
  $user_id = null 
)
protected

Reimplemented in OAuth2\OpenID\Controller\AuthorizeController.

Definition at line 104 of file AuthorizeController.php.

◆ validateAuthorizeRequest()

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

◆ validateRedirectUri()

OAuth2\Controller\AuthorizeController::validateRedirectUri (   $inputUri,
  $registeredUriString 
)
protected

Internal method for validating redirect URI supplied

Parameters
string$inputUriThe submitted URI to be validated
string$registeredUriStringThe allowed URI(s) to validate against. Can be a space-delimited string of URIs to allow for multiple URIs
See also
http://tools.ietf.org/html/rfc6749#section-3.1.2

Definition at line 330 of file AuthorizeController.php.

Member Data Documentation

◆ $clientStorage

OAuth2\Controller\AuthorizeController::$clientStorage
protected

Definition at line 22 of file AuthorizeController.php.

◆ $config

OAuth2\Controller\AuthorizeController::$config
protected

Definition at line 24 of file AuthorizeController.php.

◆ $responseTypes

OAuth2\Controller\AuthorizeController::$responseTypes
protected

Definition at line 23 of file AuthorizeController.php.

◆ $scopeUtil

OAuth2\Controller\AuthorizeController::$scopeUtil
protected

Definition at line 25 of file AuthorizeController.php.


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