Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| OidcClientConfig | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getScopesAsString | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * OIDC client configuration. |
| 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 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 2026-04-18 |
| 16 | */ |
| 17 | |
| 18 | declare(strict_types=1); |
| 19 | |
| 20 | namespace phpMyFAQ\Auth\Oidc; |
| 21 | |
| 22 | use SensitiveParameter; |
| 23 | |
| 24 | final readonly class OidcClientConfig |
| 25 | { |
| 26 | /** |
| 27 | * @param list<string> $scopes |
| 28 | */ |
| 29 | public function __construct( |
| 30 | public string $clientId, |
| 31 | #[SensitiveParameter] |
| 32 | public string $clientSecret, |
| 33 | public string $redirectUri, |
| 34 | public array $scopes, |
| 35 | ) { |
| 36 | } |
| 37 | |
| 38 | public function getScopesAsString(): string |
| 39 | { |
| 40 | return implode(' ', $this->scopes); |
| 41 | } |
| 42 | } |