Initial commit

This commit is contained in:
root
2025-12-21 09:59:57 -05:00
committed by Sebastian Krupinski
commit 5ffa224a37
5 changed files with 686 additions and 0 deletions

73
lib/Module.php Normal file
View File

@@ -0,0 +1,73 @@
<?php
declare(strict_types=1);
namespace KTXM\AuthenticationProviderMail;
use KTXC\Resource\ProviderManager;
use KTXF\Module\ModuleBrowserInterface;
use KTXF\Module\ModuleInstanceAbstract;
/**
* Email Challenge Authentication Provider Module
* Provides email-based OTP authentication
*/
class Module extends ModuleInstanceAbstract implements ModuleBrowserInterface
{
public function __construct(
private readonly ProviderManager $providerManager,
) {}
public function handle(): string
{
return 'authentication_provider_mail';
}
public function label(): string
{
return 'Mail Authentication Provider';
}
public function author(): string
{
return 'Ktrix';
}
public function description(): string
{
return 'Ktrix Email Authentication Provider - authenticates users via one-time codes sent to their email address';
}
public function version(): string
{
return '0.0.1';
}
public function permissions(): array
{
return [
'authentication_provider_mail' => [
'label' => 'Access Mail Authentication Provider',
'description' => 'View and access the mail authentication provider module',
'group' => 'Authentication Providers'
],
];
}
public function boot(): void
{
$this->providerManager->register('authentication', 'mail', Provider::class);
}
public function registerBI(): array
{
return [
'handle' => $this->handle(),
'namespace' => 'AuthenticationProviderEmail',
'version' => $this->version(),
'label' => $this->label(),
'author' => $this->author(),
'description' => $this->description(),
];
}
}