forked from codeigniter4/shield
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRegistrar.php
More file actions
57 lines (50 loc) · 1.29 KB
/
Registrar.php
File metadata and controls
57 lines (50 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
declare(strict_types=1);
namespace CodeIgniter\Shield\Config;
use CodeIgniter\Shield\Authentication\Passwords\ValidationRules as PasswordRules;
use CodeIgniter\Shield\Collectors\Auth;
use CodeIgniter\Shield\Filters\AuthRates;
use CodeIgniter\Shield\Filters\ChainAuth;
use CodeIgniter\Shield\Filters\SessionAuth;
use CodeIgniter\Shield\Filters\TokenAuth;
class Registrar
{
/**
* Registers the Shield filters.
*/
public static function Filters(): array
{
return [
'aliases' => [
'session' => SessionAuth::class,
'tokens' => TokenAuth::class,
'chain' => ChainAuth::class,
'auth-rates' => AuthRates::class,
],
];
}
public static function Validation(): array
{
return [
'ruleSets' => [
PasswordRules::class,
],
];
}
public static function Toolbar(): array
{
return [
'collectors' => [
Auth::class,
],
];
}
public static function Generators(): array
{
return [
'views' => [
'shield:model' => 'CodeIgniter\Shield\Commands\Generators\Views\usermodel.tpl.php',
],
];
}
}