1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* Copyright 2016 SURFnet B.V. |
5
|
|
|
* |
6
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
7
|
|
|
* you may not use this file except in compliance with the License. |
8
|
|
|
* You may obtain a copy of the License at |
9
|
|
|
* |
10
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0 |
11
|
|
|
* |
12
|
|
|
* Unless required by applicable law or agreed to in writing, software |
13
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, |
14
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
15
|
|
|
* See the License for the specific language governing permissions and |
16
|
|
|
* limitations under the License. |
17
|
|
|
*/ |
18
|
|
|
|
19
|
|
|
namespace Surfnet\StepupMiddleware\ApiBundle\Configuration\Entity; |
20
|
|
|
|
21
|
|
|
use Doctrine\ORM\Mapping as ORM; |
22
|
|
|
use Surfnet\Stepup\Configuration\Value\Institution; |
23
|
|
|
use Surfnet\Stepup\Configuration\Value\NumberOfTokensPerIdentityOption; |
24
|
|
|
use Surfnet\Stepup\Configuration\Value\SelectRaaOption; |
25
|
|
|
use Surfnet\Stepup\Configuration\Value\ShowRaaContactInformationOption; |
26
|
|
|
use Surfnet\Stepup\Configuration\Value\UseRaaOption; |
27
|
|
|
use Surfnet\Stepup\Configuration\Value\UseRaLocationsOption; |
28
|
|
|
use Surfnet\Stepup\Configuration\Value\UseRaOption; |
29
|
|
|
use Surfnet\Stepup\Configuration\Value\VerifyEmailOption; |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* @ORM\Entity( |
33
|
|
|
* repositoryClass="Surfnet\StepupMiddleware\ApiBundle\Configuration\Repository\InstitutionAuthorizationRepository" |
34
|
|
|
* ) |
35
|
|
|
*/ |
36
|
|
|
class InstitutionAuthorization |
37
|
|
|
{ |
38
|
|
|
/** |
39
|
|
|
* @ORM\Id |
40
|
|
|
* @ORM\Column(type="stepup_configuration_institution") |
41
|
|
|
* |
42
|
|
|
* @var Institution |
43
|
|
|
*/ |
44
|
|
|
public $institution; |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @ORM\Column(type="stepup_use_ra_option", nullable=true) |
48
|
|
|
* |
49
|
|
|
* @var UseRaOption |
50
|
|
|
*/ |
51
|
|
|
public $useRaOption; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @ORM\Column(type="stepup_use_raa_option", nullable=true) |
55
|
|
|
* |
56
|
|
|
* @var UseRaaOption |
57
|
|
|
*/ |
58
|
|
|
public $useRaaOption; |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* @ORM\Column(type="stepup_select_raa_option", nullable=true) |
62
|
|
|
* |
63
|
|
|
* @var SelectRaaOption |
64
|
|
|
*/ |
65
|
|
|
public $selectRaaOption; |
66
|
|
|
|
67
|
|
|
public static function create( |
68
|
|
|
Institution $institution, |
69
|
|
|
UseRaOption $useRaOption, |
70
|
|
|
UseRaaOption $useRaaOption, |
71
|
|
|
SelectRaaOption $selectRaaOption |
72
|
|
|
) { |
73
|
|
|
$options = new self; |
74
|
|
|
|
75
|
|
|
$options->institution = $institution; |
76
|
|
|
|
77
|
|
|
$options->useRaOption = $useRaOption; |
78
|
|
|
$options->useRaaOption = $useRaaOption; |
79
|
|
|
$options->selectRaaOption = $selectRaaOption; |
80
|
|
|
|
81
|
|
|
return $options; |
82
|
|
|
} |
83
|
|
|
} |
84
|
|
|
|