for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Created by PhpStorm.
* User: Alexandre
* Date: 31/12/2017
* Time: 16:31
*/
namespace OAuth2OLD\Credential;
class AuthorizationCode
{
* @var string
private $code;
private $clientIdentifier;
* @var null|string
private $redirectUri;
public function __construct(string $code, string $clientIdentifier, ?string $redirectUri = null)
$this->code = $code;
$this->clientIdentifier = $clientIdentifier;
$this->redirectUri = $redirectUri;
}
public function getClientIdentifier() {
return $this->clientIdentifier;
* @see
*
* @throws \Exception
static public function generate()
static
return bin2hex(random_bytes(8));
* @return null|string
public function getRedirectUri(): ?string
return $this->redirectUri;
* @return string
public function getCode(): string
return $this->code;