Skip to content

Commit

Permalink
Add nonce field in JWT Object
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardnll committed Oct 28, 2021
1 parent d31554c commit 1bf4ec2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Auth/Struct/JwtPayload.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ final class JwtPayload

private int $authTime;

private ?string $nonce;

private bool $nonceSupported;

public function __construct(
Expand All @@ -39,7 +41,8 @@ public function __construct(
bool $emailVerified,
bool $isPrivateEmail,
int $authTime,
bool $nonceSupported
bool $nonceSupported,
?string $nonce
) {
$this->iss = $iss;
$this->aud = $aud;
Expand All @@ -52,6 +55,7 @@ public function __construct(
$this->isPrivateEmail = $isPrivateEmail;
$this->authTime = $authTime;
$this->nonceSupported = $nonceSupported;
$this->nonce = $nonce;
}

public function getIss(): string
Expand Down Expand Up @@ -104,6 +108,11 @@ public function getAuthTime(): int
return $this->authTime;
}

public function getNonce(): ?string
{
return $this->nonce;
}

public function isNonceSupported(): bool
{
return $this->nonceSupported;
Expand Down

0 comments on commit 1bf4ec2

Please sign in to comment.