Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
9 / 9 |
|
100.00% |
6 / 6 |
CRAP | |
100.00% |
1 / 1 |
| WebAuthnUser | |
100.00% |
9 / 9 |
|
100.00% |
6 / 6 |
6 | |
100.00% |
1 / 1 |
| getId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setId | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setName | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getWebAuthnKeys | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setWebAuthnKeys | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Entity class for WebAuthn user. |
| 5 | * |
| 6 | * This Source Code Form is subject to the terms of the Mozilla Public License, |
| 7 | * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
| 8 | * obtain one at https://mozilla.org/MPL/2.0/. |
| 9 | * |
| 10 | * @package phpMyFAQ |
| 11 | * @author Thorsten Rinne <thorsten@phpmyfaq.de> |
| 12 | * @copyright 2024-2026 phpMyFAQ Team |
| 13 | * @license https://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
| 14 | * @link https://www.phpmyfaq.de |
| 15 | * @since 2024-11-09 |
| 16 | */ |
| 17 | |
| 18 | declare(strict_types=1); |
| 19 | |
| 20 | namespace phpMyFAQ\Auth\WebAuthn; |
| 21 | |
| 22 | class WebAuthnUser |
| 23 | { |
| 24 | private string $id; |
| 25 | |
| 26 | private string $name; |
| 27 | |
| 28 | private string $webAuthnKeys; |
| 29 | |
| 30 | public function getId(): string |
| 31 | { |
| 32 | return $this->id; |
| 33 | } |
| 34 | |
| 35 | public function setId(string $id): WebAuthnUser |
| 36 | { |
| 37 | $this->id = $id; |
| 38 | return $this; |
| 39 | } |
| 40 | |
| 41 | public function getName(): string |
| 42 | { |
| 43 | return $this->name; |
| 44 | } |
| 45 | |
| 46 | public function setName(string $name): WebAuthnUser |
| 47 | { |
| 48 | $this->name = $name; |
| 49 | return $this; |
| 50 | } |
| 51 | |
| 52 | public function getWebAuthnKeys(): string |
| 53 | { |
| 54 | return $this->webAuthnKeys; |
| 55 | } |
| 56 | |
| 57 | public function setWebAuthnKeys(string $webAuthnKeys): WebAuthnUser |
| 58 | { |
| 59 | $this->webAuthnKeys = $webAuthnKeys; |
| 60 | return $this; |
| 61 | } |
| 62 | } |