Fixes static analysis
This commit is contained in:
@@ -33,6 +33,7 @@ class CreateAssertionChallenge
|
||||
$options = [];
|
||||
|
||||
if ($assertion->acceptedCredentials?->isNotEmpty()) {
|
||||
// @phpstan-ignore-next-line
|
||||
$options['credentials'] = $assertion->acceptedCredentials->map->getKey()->toArray();
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ class MayRetrieveCredentialsIdForUser
|
||||
* Adapt all credentials into an `allowCredentials` digestible array.
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Collection<int, \Laragear\WebAuthn\Models\WebAuthnCredential> $credentials
|
||||
* @return \Illuminate\Support\Collection<int, array>
|
||||
* @return Illuminate\Support\Collection<int, array{id?: mixed, type: string, transports?: non-empty-array<int, string>}>
|
||||
*/
|
||||
protected function parseCredentials(EloquentCollection $credentials): Collection
|
||||
{
|
||||
|
||||
@@ -56,6 +56,7 @@ class CheckCredentialIsForUser
|
||||
*/
|
||||
protected function validateUser(AssertionValidation $validation): void
|
||||
{
|
||||
// @phpstan-ignore-next-line
|
||||
if ($validation->credential->authenticatable()->isNot($validation->user)) {
|
||||
throw AssertionException::make('User is not owner of the stored credential.');
|
||||
}
|
||||
|
||||
@@ -76,10 +76,10 @@ class AuthenticatorData
|
||||
* @param string $relyingPartyIdHash
|
||||
* @param object $flags
|
||||
* @param int $counter
|
||||
* @param object{aaguid: int|bool, credentialId: string, credentialPublicKey: string} $attestedCredentialData
|
||||
* @param object $attestedCredentialData
|
||||
* @param array $extensionData
|
||||
*/
|
||||
public function __construct(
|
||||
final public function __construct(
|
||||
public string $relyingPartyIdHash,
|
||||
public object $flags,
|
||||
public int $counter,
|
||||
|
||||
Reference in New Issue
Block a user