Skip to content

Commit 34572fe

Browse files
Stable release
1 parent 6c3e288 commit 34572fe

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,30 @@ Configuration app
4242

4343
```
4444

45+
46+
```php
47+
48+
'on beforeRequest' => function ($event) {
49+
//For example in addition to close the admin panel http authorization
50+
if (\Yii::$app->admin->requestIsAdmin)
51+
{
52+
\Yii::$app->httpBasicAuth->verify();
53+
}
54+
},
55+
56+
'components' =>
57+
[
58+
'httpBasicAuth' =>
59+
[
60+
'class' => 'skeeks\yii2\httpBasicAuth\HttpBasicAuthComponent',
61+
'login' => 'login',
62+
'password' => 'password',
63+
],
64+
65+
]
66+
67+
```
68+
4569
___
4670

4771
> [![skeeks!](https://gravatar.com/userimage/74431132/13d04d83218593564422770b616e5622.jpg)](http://skeeks.com)

0 commit comments

Comments
 (0)