Initial commit

This commit is contained in:
root
2025-12-21 10:00:41 -05:00
committed by Sebastian Krupinski
commit d2b2846567
17 changed files with 2757 additions and 0 deletions

73
lib/Module.php Normal file
View File

@@ -0,0 +1,73 @@
<?php
declare(strict_types=1);
namespace KTXM\AuthenticationProviderPassword;
use KTXC\Resource\ProviderManager;
use KTXF\Module\ModuleInstanceAbstract;
/**
* Default Identity Provider Module
* Provides local database authentication
*/
class Module extends ModuleInstanceAbstract
{
public function __construct(
private readonly ProviderManager $providerManager,
) {}
public function handle(): string
{
return 'authentication_provider_password';
}
public function label(): string
{
return 'Password Authentication Provider';
}
public function author(): string
{
return 'Ktrix';
}
public function description(): string
{
return 'Ktrix Password Authentication Provider - authenticates users against credentials stored in the database';
}
public function version(): string
{
return '0.0.1';
}
public function permissions(): array
{
return [
'authentication_provider_password' => [
'label' => 'Access Password Authentication Provider',
'description' => 'View and access the password authentication provider module',
'group' => 'Authentication Providers'
],
];
}
public function boot(): void
{
$this->providerManager->register('authentication', 'password', Provider::class);
}
public function registerBI(): array
{
return [
'handle' => $this->handle(),
'namespace' => 'AuthenticationProviderPassword',
'version' => $this->version(),
'label' => $this->label(),
'author' => $this->author(),
'description' => $this->description(),
'boot' => 'static/module.mjs',
];
}
}