Skip to content

Commit 5b50267

Browse files
authored
Merge pull request #931 from kenjis/docs-filter-alias
docs: improve on filter aliases
2 parents e17a766 + 582a6ae commit 5b50267

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

docs/quick_start_guide/using_session_auth.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,12 @@ public $globals = [
106106
];
107107
```
108108

109+
!!! note
110+
111+
The filter `$aliases` that Shield provides are automatically added for you by the
112+
[Registrar](https://codeigniter.com/user_guide/general/configuration.html#registrars)
113+
class located at **src/Config/Registrar.php**. So you don't need to add in
114+
your **app/Config/Filters.php**.
115+
109116
Check your filters with the [spark routes](https://codeigniter.com/user_guide/incoming/routing.html#spark-routes)
110117
command.

docs/references/controller_filters.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44

55
!!! note
66

7-
These filters are already loaded for you by the [registrar](https://codeigniter.com/user_guide/general/configuration.html#registrars) class located at **src/Config/Registrar.php**.
7+
The filter `$aliases` that Shield provides are automatically added for you by the
8+
[Registrar](https://codeigniter.com/user_guide/general/configuration.html#registrars)
9+
class located at **src/Config/Registrar.php**. So you don't need to add in
10+
your **app/Config/Filters.php**.
811

912
The [Controller Filters](https://codeigniter.com/user_guide/incoming/filters.html) you can use to protect your routes Shield provides are:
1013

1114
```php
12-
public $aliases = [
13-
// ...
15+
$aliases = [
1416
'session' => \CodeIgniter\Shield\Filters\SessionAuth::class,
1517
'tokens' => \CodeIgniter\Shield\Filters\TokenAuth::class,
1618
'hmac' => \CodeIgniter\Shield\Filters\HmacAuth::class,

0 commit comments

Comments
 (0)