Skip to content

Commit 2272c23

Browse files
authored
Allow resident key to be null (#377)
1 parent aa528cb commit 2272c23

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/webauthn/src/AuthenticatorSelectionCriteria.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class AuthenticatorSelectionCriteria implements JsonSerializable
4646

4747
private string $userVerification = self::USER_VERIFICATION_REQUIREMENT_PREFERRED;
4848

49-
private string $residentKey = self::RESIDENT_KEY_REQUIREMENT_PREFERRED;
49+
private null|string $residentKey = self::RESIDENT_KEY_REQUIREMENT_PREFERRED;
5050

5151
public static function create(): self
5252
{
@@ -78,7 +78,7 @@ public function setUserVerification(string $userVerification): self
7878
return $this;
7979
}
8080

81-
public function setResidentKey(string $residentKey): self
81+
public function setResidentKey(null|string $residentKey): self
8282
{
8383
$this->residentKey = $residentKey;
8484
//$this->requireResidentKey = $residentKey === self::RESIDENT_KEY_REQUIREMENT_REQUIRED;
@@ -104,7 +104,7 @@ public function getUserVerification(): string
104104
return $this->userVerification;
105105
}
106106

107-
public function getResidentKey(): string
107+
public function getResidentKey(): null|string
108108
{
109109
return $this->residentKey;
110110
}

0 commit comments

Comments
 (0)