-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
blockade.php
97 lines (82 loc) · 2.65 KB
/
blockade.php
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
return [
/*
* Decide if the authentication package should be enabled.
*/
'enabled' => env('BLOCKADE_ENABLED', false),
/*
* Set the password used for the authentication process.
*/
'password' => env('BLOCKADE_PASSWORD', null),
/*
* Define which routes should be excluded for blockade check.
* You can specify route names or paths including wildcards.
* The routes will be check via the Request::is() and Request::routeIs() methods.
*/
'excluded' => [],
/*
* Specify the authentication handler used for granting access.
*
* Available handlers:
* - \romanzipp\Blockade\Handlers\FormHandler::class
* - \romanzipp\Blockade\Handlers\QueryParameterHandler::class
*/
'handler' => \romanzipp\Blockade\Handlers\FormHandler::class,
/*
* Specify where to store the authentication state.
*
* Available stores:
* - \romanzipp\Blockade\Stores\CookieStore::class
* - \romanzipp\Blockade\Stores\SessionStore::class
*/
'store' => \romanzipp\Blockade\Stores\CookieStore::class,
/*
* Routing options.
*/
'routes' => [
'prefix' => 'blockade',
'middleware' => [
\Illuminate\Foundation\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
\Illuminate\Cookie\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\romanzipp\Blockade\Http\Middleware\BlockadeMiddleware::class,
],
],
/*
* Branding options.
*/
'branding' => [
'logo_url' => null,
],
/*
* Specify options for each handler.
*/
'handlers' => [
/** @see \romanzipp\Blockade\Handlers\FormHandler */
'form' => [
'input_field' => 'blockade_password',
],
/** @see \romanzipp\Blockade\Handlers\QueryParameterHandler */
'query' => [
'parameter' => 'blockade_password',
],
],
/*
* Stores define where to store a successful authentication state.
*/
'stores' => [
/** @see \romanzipp\Blockade\Stores\CookieStore */
'cookie' => [
'name' => env('BLOCKADE_COOKIE_NAME', 'blockade'),
'domain' => env('BLOCKADE_COOKIE_DOMAIN'),
'duration' => 60 * 24 * 7,
'path' => null,
],
/** @see \romanzipp\Blockade\Stores\SessionStore */
'session' => [
'key' => env('BLOCKADE_SESSION_KEY', 'blockade_hash'),
],
],
];