‪TYPO3CMS  ‪main
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 {
32 
33  public function ‪__construct(
34  private readonly string ‪$identifier,
35  private readonly string $title,
36  private readonly string $description,
37  private readonly string $setupInstructions,
38  private readonly string $iconIdentifier,
39  private readonly bool $isDefaultProviderAllowed,
40  private readonly string $serviceName,
41  private readonly ContainerInterface $container
42  ) {}
43 
44  public function ‪getIdentifier(): string
45  {
46  return ‪$this->identifier;
47  }
48 
49  public function ‪getTitle(): string
50  {
51  return $this->title;
52  }
53 
54  public function ‪getDescription(): string
55  {
56  return $this->description;
57  }
58 
59  public function ‪getIconIdentifier(): string
60  {
61  return $this->iconIdentifier;
62  }
63 
64  public function ‪getSetupInstructions(): string
65  {
66  return $this->setupInstructions;
67  }
68 
69  public function ‪isDefaultProviderAllowed(): bool
70  {
71  return $this->isDefaultProviderAllowed;
72  }
73 
74  public function ‪canProcess(ServerRequestInterface $request): bool
75  {
76  return $this->‪getInstance()->canProcess($request);
77  }
78 
79  public function ‪isActive(‪MfaProviderPropertyManager $propertyManager): bool
80  {
81  return $this->‪getInstance()->isActive($propertyManager);
82  }
83 
84  public function ‪isLocked(‪MfaProviderPropertyManager $propertyManager): bool
85  {
86  return $this->‪getInstance()->isLocked($propertyManager);
87  }
88 
89  public function ‪verify(ServerRequestInterface $request, ‪MfaProviderPropertyManager $propertyManager): bool
90  {
91  return $this->‪getInstance()->verify($request, $propertyManager);
92  }
93 
94  public function ‪handleRequest(
95  ServerRequestInterface $request,
96  ‪MfaProviderPropertyManager $propertyManager,
97  ‪MfaViewType $type
98  ): ResponseInterface {
99  return $this->‪getInstance()->handleRequest($request, $propertyManager, $type);
100  }
101 
102  public function ‪activate(ServerRequestInterface $request, ‪MfaProviderPropertyManager $propertyManager): bool
103  {
104  return $this->‪getInstance()->activate($request, $propertyManager);
105  }
106 
107  public function ‪deactivate(ServerRequestInterface $request, ‪MfaProviderPropertyManager $propertyManager): bool
108  {
109  return $this->‪getInstance()->deactivate($request, $propertyManager);
110  }
111 
112  public function ‪unlock(ServerRequestInterface $request, ‪MfaProviderPropertyManager $propertyManager): bool
113  {
114  return $this->‪getInstance()->unlock($request, $propertyManager);
115  }
116 
117  public function ‪update(ServerRequestInterface $request, ‪MfaProviderPropertyManager $propertyManager): bool
118  {
119  return $this->‪getInstance()->update($request, $propertyManager);
120  }
121 
123  {
124  return $this->instance ?? $this->‪createInstance();
125  }
126 
128  {
129  $this->instance = $this->container->get($this->serviceName);
130  return ‪$this->instance;
131  }
132 }
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\verify
‪verify(ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
Definition: MfaProviderManifest.php:89
‪TYPO3\CMS\Core\Authentication\Mfa
Definition: MfaProviderInterface.php:18
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\$instance
‪MfaProviderInterface $instance
Definition: MfaProviderManifest.php:31
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\activate
‪activate(ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
Definition: MfaProviderManifest.php:102
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\handleRequest
‪handleRequest(ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager, MfaViewType $type)
Definition: MfaProviderManifest.php:94
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\getIdentifier
‪getIdentifier()
Definition: MfaProviderManifest.php:44
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifestInterface
Definition: MfaProviderManifestInterface.php:26
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\createInstance
‪createInstance()
Definition: MfaProviderManifest.php:127
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\getTitle
‪getTitle()
Definition: MfaProviderManifest.php:49
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\isActive
‪isActive(MfaProviderPropertyManager $propertyManager)
Definition: MfaProviderManifest.php:79
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\getSetupInstructions
‪getSetupInstructions()
Definition: MfaProviderManifest.php:64
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\__construct
‪__construct(private readonly string $identifier, private readonly string $title, private readonly string $description, private readonly string $setupInstructions, private readonly string $iconIdentifier, private readonly bool $isDefaultProviderAllowed, private readonly string $serviceName, private readonly ContainerInterface $container)
Definition: MfaProviderManifest.php:33
‪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:117
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\isLocked
‪isLocked(MfaProviderPropertyManager $propertyManager)
Definition: MfaProviderManifest.php:84
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\getInstance
‪getInstance()
Definition: MfaProviderManifest.php:122
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\deactivate
‪deactivate(ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
Definition: MfaProviderManifest.php:107
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderPropertyManager
Definition: MfaProviderPropertyManager.php:33
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\canProcess
‪canProcess(ServerRequestInterface $request)
Definition: MfaProviderManifest.php:74
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\getDescription
‪getDescription()
Definition: MfaProviderManifest.php:54
‪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:112
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\getIconIdentifier
‪getIconIdentifier()
Definition: MfaProviderManifest.php:59
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderManifest\isDefaultProviderAllowed
‪isDefaultProviderAllowed()
Definition: MfaProviderManifest.php:69
‪TYPO3\CMS\Core\Authentication\Mfa\MfaViewType
‪MfaViewType
Definition: MfaViewType.php:24
‪TYPO3\CMS\Webhooks\Message\$identifier
‪identifier readonly string $identifier
Definition: FileAddedMessage.php:37