\OAuth2\ControllerAuthorizeControllerInterface

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

@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();

Summary

Methods
Constants
handleAuthorizeRequest()
validateAuthorizeRequest()
RESPONSE_TYPE_AUTHORIZATION_CODE
RESPONSE_TYPE_ACCESS_TOKEN
No protected methods found
N/A
No private methods found
N/A

Constants

RESPONSE_TYPE_AUTHORIZATION_CODE

RESPONSE_TYPE_AUTHORIZATION_CODE

List of possible authentication response types.

The "authorization_code" mechanism exclusively supports 'code' and the "implicit" mechanism exclusively supports 'token'.

RESPONSE_TYPE_ACCESS_TOKEN

RESPONSE_TYPE_ACCESS_TOKEN

Methods

handleAuthorizeRequest()

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

Handle the OAuth request

Parameters

\OAuth2\RequestInterface $request
\OAuth2\ResponseInterface $response
$is_authorized
null $user_id

Returns

mixed