Conditions | 3 |
Paths | 3 |
Total Lines | 32 |
Code Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
43 | public function validate($spEntityId, $nameId) |
||
44 | { |
||
45 | if (!$nameId) { |
||
46 | $this->logger->info( |
||
47 | 'No NameID provided, sending response with status Requester Error' |
||
48 | ); |
||
49 | return false; |
||
50 | } |
||
51 | |||
52 | $serviceProvider = $this->entityService->getServiceProvider($spEntityId); |
||
53 | |||
54 | if (!$serviceProvider->isAllowedToUseSecondFactorOnlyFor($nameId)) { |
||
55 | $this->logger->info( |
||
56 | sprintf( |
||
57 | 'SP "%s" may not use SecondFactorOnly mode for nameid "%s", sending response with status Requester Error', |
||
|
|||
58 | $spEntityId, |
||
59 | $nameId |
||
60 | ) |
||
61 | ); |
||
62 | return false; |
||
63 | } |
||
64 | |||
65 | $this->logger->info( |
||
66 | sprintf( |
||
67 | 'SP "%s" is allowed to use SecondFactorOnly mode for nameid "%s"', |
||
68 | $spEntityId, |
||
69 | $nameId |
||
70 | ) |
||
71 | ); |
||
72 | |||
73 | return true; |
||
74 | } |
||
75 | } |
||
76 |
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.