Skip to content

Commit

Permalink
Allow resident key to be null (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
Spomky authored Jan 31, 2023
1 parent aa528cb commit 2272c23
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/webauthn/src/AuthenticatorSelectionCriteria.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class AuthenticatorSelectionCriteria implements JsonSerializable

private string $userVerification = self::USER_VERIFICATION_REQUIREMENT_PREFERRED;

private string $residentKey = self::RESIDENT_KEY_REQUIREMENT_PREFERRED;
private null|string $residentKey = self::RESIDENT_KEY_REQUIREMENT_PREFERRED;

public static function create(): self
{
Expand Down Expand Up @@ -78,7 +78,7 @@ public function setUserVerification(string $userVerification): self
return $this;
}

public function setResidentKey(string $residentKey): self
public function setResidentKey(null|string $residentKey): self
{
$this->residentKey = $residentKey;
//$this->requireResidentKey = $residentKey === self::RESIDENT_KEY_REQUIREMENT_REQUIRED;
Expand All @@ -104,7 +104,7 @@ public function getUserVerification(): string
return $this->userVerification;
}

public function getResidentKey(): string
public function getResidentKey(): null|string
{
return $this->residentKey;
}
Expand Down

0 comments on commit 2272c23

Please sign in to comment.