Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
16 / 16 |
|
100.00% |
9 / 9 |
CRAP | |
100.00% |
1 / 1 |
LtiPlatformRegistration | |
100.00% |
16 / 16 |
|
100.00% |
9 / 9 |
9 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
8 / 8 |
|
100.00% |
1 / 1 |
1 | |||
getIdentifier | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getAudience | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getOidcAuthenticationUrl | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getOAuth2AccessTokenUrl | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getJwksUrl | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getClientId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getDeploymentId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | /** |
4 | * This program is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU General Public License |
6 | * as published by the Free Software Foundation; under version 2 |
7 | * of the License (non-upgradable). |
8 | * |
9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
17 | * |
18 | * Copyright (c) 2021 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT); |
19 | */ |
20 | |
21 | declare(strict_types=1); |
22 | |
23 | namespace oat\taoLti\models\classes\Platform; |
24 | |
25 | use OAT\Library\Lti1p3Core\Platform\PlatformInterface; |
26 | |
27 | /** |
28 | * LTI platform registration Value Object. It contains combined data from Platform + Registration for LTI 1.3 |
29 | */ |
30 | class LtiPlatformRegistration implements PlatformInterface |
31 | { |
32 | /** @var string */ |
33 | private $identifier; |
34 | |
35 | /** @var string */ |
36 | private $name; |
37 | |
38 | /** @var string */ |
39 | private $audience; |
40 | |
41 | /** @var string */ |
42 | private $oauth2AccessTokenUrl; |
43 | |
44 | /** @var string */ |
45 | private $oidcAuthenticationUrl; |
46 | |
47 | /** @var string */ |
48 | private $jwksUrl; |
49 | |
50 | /** @var string */ |
51 | private $clientId; |
52 | |
53 | /** @var string */ |
54 | private $deploymentId; |
55 | |
56 | public function __construct( |
57 | string $identifier, |
58 | string $name, |
59 | string $audience, |
60 | string $oauth2AccessTokenUrl, |
61 | string $oidcAuthenticationUrl, |
62 | string $jwksUrl, |
63 | string $clientId, |
64 | string $deploymentId |
65 | ) { |
66 | $this->identifier = $identifier; |
67 | $this->name = $name; |
68 | $this->audience = $audience; |
69 | $this->oauth2AccessTokenUrl = $oauth2AccessTokenUrl; |
70 | $this->oidcAuthenticationUrl = $oidcAuthenticationUrl; |
71 | $this->jwksUrl = $jwksUrl; |
72 | $this->clientId = $clientId; |
73 | $this->deploymentId = $deploymentId; |
74 | } |
75 | |
76 | public function getIdentifier(): string |
77 | { |
78 | return $this->identifier; |
79 | } |
80 | |
81 | public function getName(): string |
82 | { |
83 | return $this->name; |
84 | } |
85 | |
86 | public function getAudience(): string |
87 | { |
88 | return $this->audience; |
89 | } |
90 | |
91 | public function getOidcAuthenticationUrl(): string |
92 | { |
93 | return $this->oidcAuthenticationUrl; |
94 | } |
95 | |
96 | public function getOAuth2AccessTokenUrl(): string |
97 | { |
98 | return $this->oauth2AccessTokenUrl; |
99 | } |
100 | |
101 | public function getJwksUrl(): string |
102 | { |
103 | return $this->jwksUrl; |
104 | } |
105 | |
106 | public function getClientId(): string |
107 | { |
108 | return $this->clientId; |
109 | } |
110 | |
111 | public function getDeploymentId(): string |
112 | { |
113 | return $this->deploymentId; |
114 | } |
115 | } |