This adapter is the simplest showcase for the Auth adapter structure. It will add a single demo user to the FileGator app.
FileGator v7+
-
Copy
DemoAuth.php
file tofilegator/backend/Services/Auth/Adapters/
-
Replace your current Auth handler in
configuration.php
file like this:
'Filegator\Services\Auth\AuthInterface' => [
'handler' => '\Filegator\Services\Auth\Adapters\DemoAuth',
'config' => [
'name' => 'Test User',
'username' => '[email protected]',
'password' => 'user123',
'role' => 'user',
'permissions' => ['read', 'write', 'upload', 'download', 'batchdownload', 'zip'],
'homedir' => '/',
],
],