74 lines
1.8 KiB
PHP
74 lines
1.8 KiB
PHP
<?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(),
|
|
];
|
|
}
|
|
}
|