for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Created by PhpStorm.
* User: Alexandre
* Date: 07/03/2018
* Time: 21:57
*/
namespace OAuth2\Credentials;
class AuthorizationCode implements AuthorizationCodeInterface
{
* @var string
protected $code;
protected $scope;
protected $clientIdentifier;
protected $resourceOwnerIdentifier;
* @var string|null
protected $requestedScope;
protected $redirectUri;
* @var int
protected $expiresAt;
public function __construct(string $code, string $scope, string $clientIdentifier, string $resourceOwnerIdentifier,
int $expiresAt, ?string $requestedScope = null, ?string $redirectUri = null)
$this->code = $code;
$this->scope = $scope;
$this->clientIdentifier = $clientIdentifier;
$this->resourceOwnerIdentifier = $resourceOwnerIdentifier;
$this->expiresAt = $expiresAt;
$this->requestedScope = $requestedScope;
$this->redirectUri = $redirectUri;
}
* @return string
public function getCode(): string
return $this->code;
public function getScope(): string
return $this->scope;
public function getClientIdentifier(): string
return $this->clientIdentifier;
public function getResourceOwnerIdentifier(): string
return $this->resourceOwnerIdentifier;
public function isExpired(): bool
return time() > $this->expiresAt;
* @return null|string
public function getRequestedScope(): ?string
return $this->requestedScope;
public function getRedirectUri(): ?string
return $this->redirectUri;