1 | <?php |
||
15 | final class SecurityManager |
||
16 | { |
||
17 | /** @var IdentificationVerifier */ |
||
18 | private $identificationVerifier; |
||
19 | /** @var SecurityConfigurationFactory */ |
||
20 | private $securityConfigurationFactory; |
||
21 | |||
22 | /** |
||
23 | * SecurityManager constructor. |
||
24 | * |
||
25 | * @param IdentificationVerifier $identificationVerifier |
||
26 | * @param bool $forceIdentification |
||
27 | */ |
||
28 | public function __construct(IdentificationVerifier $identificationVerifier, $forceIdentification) |
||
34 | |||
35 | public function configure() |
||
39 | |||
40 | /** |
||
41 | * @param $value |
||
42 | * @param $filter |
||
43 | * |
||
44 | * @return bool |
||
45 | * @throws AccessDeniedException |
||
46 | * @category Security-Critical |
||
47 | */ |
||
48 | private function test($value, $filter) |
||
61 | |||
62 | /** |
||
63 | * Tests if a user is allowed to perform an action. |
||
64 | * |
||
65 | * This method should form a hard, deterministic security barrier, and only return true if it is absolutely sure |
||
66 | * that a user should have access to something. |
||
67 | * |
||
68 | * @param SecurityConfiguration $config |
||
69 | * @param User $user |
||
70 | * |
||
71 | * @return bool |
||
72 | * |
||
73 | * @category Security-Critical |
||
74 | */ |
||
75 | public function allows(SecurityConfiguration $config, User $user) |
||
97 | } |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.