Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 52f7934662 |
+20
-11
@@ -5,9 +5,8 @@ declare(strict_types=1);
|
|||||||
namespace KTXM\AuthenticationProviderPassword;
|
namespace KTXM\AuthenticationProviderPassword;
|
||||||
|
|
||||||
use KTXC\Resource\ProviderManager;
|
use KTXC\Resource\ProviderManager;
|
||||||
use KTXF\Module\Configuration\BrowserModuleContextInterface;
|
use KTXF\Module\ModuleBrowserInterface;
|
||||||
use KTXF\Module\Configuration\ConsoleModuleContextInterface;
|
use KTXF\Module\ModuleConsoleInterface;
|
||||||
use KTXF\Module\Configuration\ModuleContextInterface;
|
|
||||||
use KTXF\Module\ModuleInstanceAbstract;
|
use KTXF\Module\ModuleInstanceAbstract;
|
||||||
use KTXM\AuthenticationProviderPassword\Console\UserPasswordCommand;
|
use KTXM\AuthenticationProviderPassword\Console\UserPasswordCommand;
|
||||||
|
|
||||||
@@ -15,7 +14,7 @@ use KTXM\AuthenticationProviderPassword\Console\UserPasswordCommand;
|
|||||||
* Default Identity Provider Module
|
* Default Identity Provider Module
|
||||||
* Provides local database authentication
|
* Provides local database authentication
|
||||||
*/
|
*/
|
||||||
class Module extends ModuleInstanceAbstract
|
class Module extends ModuleInstanceAbstract implements ModuleConsoleInterface, ModuleBrowserInterface
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly ProviderManager $providerManager,
|
private readonly ProviderManager $providerManager,
|
||||||
@@ -72,13 +71,23 @@ class Module extends ModuleInstanceAbstract
|
|||||||
$this->providerManager->register('authentication', 'password', Provider::class);
|
$this->providerManager->register('authentication', 'password', Provider::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function configure(ModuleContextInterface $context): void
|
public function registerCI(): array
|
||||||
{
|
{
|
||||||
if ($context instanceof BrowserModuleContextInterface) {
|
return [
|
||||||
$context->registerModule($this, 'AuthenticationProviderPassword', 'static/module.mjs');
|
UserPasswordCommand::class,
|
||||||
}
|
];
|
||||||
if ($context instanceof ConsoleModuleContextInterface) {
|
}
|
||||||
$context->registerCommand(UserPasswordCommand::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',
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user