Skip to content

Commit

Permalink
Added AccessToken initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdgeijn committed Feb 9, 2022
1 parent 8c426cc commit df3aee4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Responses/AccessToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@

class AccessToken
{
public string $accessToken;
public ?string $accessToken;

public int $expiryTimestamp;

public function __construct( ?string $accessToken = null, int $expiryTimestamp = 0 )
{
$this->accessToken = $accessToken;
$this->expiryTimestamp = $expiryTimestamp;
}

public function isExpired(): bool
{
return time() > $this->expiryTimestamp;
Expand Down

0 comments on commit df3aee4

Please sign in to comment.