Skip to content

AuthorizationCode

Properties

storage

protected $storage

config

protected $config

Methods

__construct

public __construct(\OAuth2\Storage\AuthorizationCodeInterface $storage, array $config = array()): mixed

Parameters:

Parameter Type Description
$storage \OAuth2\Storage\AuthorizationCodeInterface
$config array

getAuthorizeResponse

public getAuthorizeResponse(mixed $params, mixed $user_id = null): mixed

Parameters:

Parameter Type Description
$params mixed
$user_id mixed

createAuthorizationCode

Handle the creation of the authorization code.

public createAuthorizationCode(mixed $client_id, mixed $user_id, mixed $redirect_uri, mixed $scope = null, mixed $code_challenge = null, mixed $code_challenge_method = null): string

Parameters:

Parameter Type Description
$client_id mixed
Client identifier related to the authorization code
$user_id mixed
User ID associated with the authorization code
$redirect_uri mixed
An absolute URI to which the authorization server will redirect the
user-agent to when the end-user authorization step is completed.
$scope mixed
(optional) Scopes to be stored in space-separated string.
$code_challenge mixed
$code_challenge_method mixed

See Also:

  • http://tools.ietf.org/html/rfc6749#section-4 -

enforceRedirect

public enforceRedirect(): true

Return Value:

if the grant type requires a redirect_uri, FALSE if not


generateAuthorizationCode

Generates an unique auth code.

protected generateAuthorizationCode(): \OAuth2\ResponseType\An

Implementing classes may want to override this function to implement other auth code generation schemes.

Return Value:

unique auth code.



Automatically generated on 2025-03-18