‪TYPO3CMS  11.5
MfaProviderManifest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
20 use Psr\Container\ContainerInterface;
21 use Psr\Http\Message\ResponseInterface;
22 use Psr\Http\Message\ServerRequestInterface;
23 
30 {
31  private string ‪$identifier;
32  private string ‪$title;
33  private string ‪$description;
34  private string ‪$setupInstructions;
35  private string ‪$iconIdentifier;
37  private string ‪$serviceName;
38  private ContainerInterface ‪$container;
40 
41  public function ‪__construct(
42  string ‪$identifier,
43  string ‪$title,
44  string ‪$description,
45  string ‪$setupInstructions,
46  string ‪$iconIdentifier,
48  string ‪$serviceName,
49  ContainerInterface ‪$container
50  ) {
51  $this->identifier = ‪$identifier;
52  $this->title = ‪$title;
53  $this->description = ‪$description;
54  $this->setupInstructions = ‪$setupInstructions;
55  $this->iconIdentifier = ‪$iconIdentifier;
57  $this->serviceName = ‪$serviceName;
58  $this->container = ‪$container;
59  }
60 
61  public function ‪getIdentifier(): string
62  {
63  return ‪$this->identifier;
64  }
65 
66  public function ‪getTitle(): string
67  {
68  return ‪$this->title;
69  }
70 
71  public function ‪getDescription(): string
72  {
73  return ‪$this->description;
74  }
75 
76  public function ‪getIconIdentifier(): string
77  {
79  }
80 
81  public function ‪getSetupInstructions(): string
82  {
84  }
85 
86  public function ‪isDefaultProviderAllowed(): bool
87  {
89  }
90 
91  public function ‪canProcess(ServerRequestInterface $request): bool
92  {
93  return $this->‪getInstance()->canProcess($request);
94  }
95 
96  public function ‪isActive(‪MfaProviderPropertyManager $propertyManager): bool
97  {
98  return $this->‪getInstance()->isActive($propertyManager);
99  }
100 
101  public function ‪isLocked(‪MfaProviderPropertyManager $propertyManager): bool
102  {
103  return $this->‪getInstance()->isLocked($propertyManager);
104  }
105 
106  public function ‪verify(ServerRequestInterface $request, ‪MfaProviderPropertyManager $propertyManager): bool
107  {
108  return $this->‪getInstance()->verify($request, $propertyManager);
109  }
110 
111  public function ‪handleRequest(
112  ServerRequestInterface $request,
113  ‪MfaProviderPropertyManager $propertyManager,
114  string $type
115  ): ResponseInterface {
116  return $this->‪getInstance()->handleRequest($request, $propertyManager, $type);
117  }
118 
119  public function ‪activate(ServerRequestInterface $request, ‪MfaProviderPropertyManager $propertyManager): bool
120  {
121  return $this->‪getInstance()->activate($request, $propertyManager);
122  }
123 
124  public function ‪deactivate(ServerRequestInterface $request, ‪MfaProviderPropertyManager $propertyManager): bool
125  {
126  return $this->‪getInstance()->deactivate($request, $propertyManager);
127  }
128 
129  public function ‪unlock(ServerRequestInterface $request, ‪MfaProviderPropertyManager $propertyManager): bool
130  {
131  return $this->‪getInstance()->unlock($request, $propertyManager);
132  }
133 
134  public function ‪update(ServerRequestInterface $request, ‪MfaProviderPropertyManager $propertyManager): bool
135  {
136  return $this->‪getInstance()->update($request, $propertyManager);
137  }
138 
140  {
141  return $this->instance ?? $this->‪createInstance();
142  }
143 
145  {
146  $this->instance = $this->container->get($this->serviceName);
147  return ‪$this->instance;
148  }
149 }
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\verify
‪verify(ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
Definition: MfaProviderManifest.php:106
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\$isDefaultProviderAllowed
‪bool $isDefaultProviderAllowed
Definition: MfaProviderManifest.php:36
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\$container
‪ContainerInterface $container
Definition: MfaProviderManifest.php:38
‪TYPO3\CMS\Core\Authentication\Mfa
Definition: MfaProviderInterface.php:18
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\$instance
‪MfaProviderInterface $instance
Definition: MfaProviderManifest.php:39
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\activate
‪activate(ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
Definition: MfaProviderManifest.php:119
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\getIdentifier
‪getIdentifier()
Definition: MfaProviderManifest.php:61
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\$serviceName
‪string $serviceName
Definition: MfaProviderManifest.php:37
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifestInterface
Definition: MfaProviderManifestInterface.php:26
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\__construct
‪__construct(string $identifier, string $title, string $description, string $setupInstructions, string $iconIdentifier, bool $isDefaultProviderAllowed, string $serviceName, ContainerInterface $container)
Definition: MfaProviderManifest.php:41
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\createInstance
‪createInstance()
Definition: MfaProviderManifest.php:144
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\handleRequest
‪handleRequest(ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager, string $type)
Definition: MfaProviderManifest.php:111
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\getTitle
‪getTitle()
Definition: MfaProviderManifest.php:66
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\isActive
‪isActive(MfaProviderPropertyManager $propertyManager)
Definition: MfaProviderManifest.php:96
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\getSetupInstructions
‪getSetupInstructions()
Definition: MfaProviderManifest.php:81
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderInterface
Definition: MfaProviderInterface.php:27
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\update
‪update(ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
Definition: MfaProviderManifest.php:134
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\isLocked
‪isLocked(MfaProviderPropertyManager $propertyManager)
Definition: MfaProviderManifest.php:101
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\getInstance
‪getInstance()
Definition: MfaProviderManifest.php:139
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\deactivate
‪deactivate(ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
Definition: MfaProviderManifest.php:124
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderPropertyManager
Definition: MfaProviderPropertyManager.php:33
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\canProcess
‪canProcess(ServerRequestInterface $request)
Definition: MfaProviderManifest.php:91
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\getDescription
‪getDescription()
Definition: MfaProviderManifest.php:71
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest
Definition: MfaProviderManifest.php:30
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\unlock
‪unlock(ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
Definition: MfaProviderManifest.php:129
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\getIconIdentifier
‪getIconIdentifier()
Definition: MfaProviderManifest.php:76
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\isDefaultProviderAllowed
‪isDefaultProviderAllowed()
Definition: MfaProviderManifest.php:86
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\$identifier
‪string $identifier
Definition: MfaProviderManifest.php:31
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\$iconIdentifier
‪string $iconIdentifier
Definition: MfaProviderManifest.php:35
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\$description
‪string $description
Definition: MfaProviderManifest.php:33
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\$setupInstructions
‪string $setupInstructions
Definition: MfaProviderManifest.php:34
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\$title
‪string $title
Definition: MfaProviderManifest.php:32