|
1 | 1 | <?php
|
2 | 2 |
|
3 |
| -/* |
4 |
| - * This file is part of jwt-auth. |
5 |
| - * |
6 |
| - * (c) Sean Tymon <[email protected]> |
7 |
| - * |
8 |
| - * For the full copyright and license information, please view the LICENSE |
9 |
| - * file that was distributed with this source code. |
10 |
| - */ |
11 | 3 | return [
|
12 | 4 | /*
|
13 | 5 | |--------------------------------------------------------------------------
|
|
22 | 14 | | since RSA and ECDSA use a private/public key combo (See below).
|
23 | 15 | |
|
24 | 16 | */
|
| 17 | + |
25 | 18 | 'secret' => env('JWT_SECRET'),
|
| 19 | + |
26 | 20 | /*
|
27 | 21 | |--------------------------------------------------------------------------
|
28 | 22 | | JWT Authentication Keys
|
|
39 | 33 | | RS256, RS384 & RS512 / ES256, ES384 & ES512 will use the keys below.
|
40 | 34 | |
|
41 | 35 | */
|
| 36 | + |
42 | 37 | 'keys' => [
|
43 | 38 | /*
|
44 | 39 | |--------------------------------------------------------------------------
|
|
50 | 45 | | E.g. 'file://path/to/public/key'
|
51 | 46 | |
|
52 | 47 | */
|
| 48 | + |
53 | 49 | 'public' => env('JWT_PUBLIC_KEY'),
|
| 50 | + |
54 | 51 | /*
|
55 | 52 | |--------------------------------------------------------------------------
|
56 | 53 | | Private Key
|
|
61 | 58 | | E.g. 'file://path/to/private/key'
|
62 | 59 | |
|
63 | 60 | */
|
| 61 | + |
64 | 62 | 'private' => env('JWT_PRIVATE_KEY'),
|
| 63 | + |
65 | 64 | /*
|
66 | 65 | |--------------------------------------------------------------------------
|
67 | 66 | | Passphrase
|
|
70 | 69 | | The passphrase for your private key. Can be null if none set.
|
71 | 70 | |
|
72 | 71 | */
|
| 72 | + |
73 | 73 | 'passphrase' => env('JWT_PASSPHRASE'),
|
74 | 74 | ],
|
| 75 | + |
75 | 76 | /*
|
76 | 77 | |--------------------------------------------------------------------------
|
77 | 78 | | JWT time to live
|
|
87 | 88 | | Notice: If you set this to null you should remove 'exp' element from 'required_claims' list.
|
88 | 89 | |
|
89 | 90 | */
|
| 91 | + |
90 | 92 | 'ttl' => env('JWT_TTL', 60),
|
91 | 93 |
|
92 | 94 | /*
|
|
105 | 107 | | systems in place to revoke the token if necessary.
|
106 | 108 | |
|
107 | 109 | */
|
| 110 | + |
108 | 111 | 'refresh_ttl' => env('JWT_REFRESH_TTL', 20160),
|
109 | 112 |
|
110 | 113 | /*
|
|
118 | 121 | | for possible values.
|
119 | 122 | |
|
120 | 123 | */
|
| 124 | + |
121 | 125 | 'algo' => env('JWT_ALGO', 'HS256'),
|
| 126 | + |
122 | 127 | /*
|
123 | 128 | |--------------------------------------------------------------------------
|
124 | 129 | | Required Claims
|
|
129 | 134 | | present in the payload.
|
130 | 135 | |
|
131 | 136 | */
|
| 137 | + |
132 | 138 | 'required_claims' => [
|
133 | 139 | 'iss',
|
134 | 140 | 'iat',
|
|
137 | 143 | 'sub',
|
138 | 144 | 'jti',
|
139 | 145 | ],
|
| 146 | + |
140 | 147 | /*
|
141 | 148 | |--------------------------------------------------------------------------
|
142 | 149 | | Persistent Claims
|
|
149 | 156 | | Note: If a claim does not exist then it will be ignored.
|
150 | 157 | |
|
151 | 158 | */
|
| 159 | + |
152 | 160 | 'persistent_claims' => [
|
153 | 161 | // 'foo',
|
154 | 162 | // 'bar',
|
155 | 163 | ],
|
| 164 | + |
156 | 165 | /*
|
157 | 166 | |--------------------------------------------------------------------------
|
158 | 167 | | Lock Subject
|
|
169 | 178 | | a little on token size.
|
170 | 179 | |
|
171 | 180 | */
|
| 181 | + |
172 | 182 | 'lock_subject' => true,
|
| 183 | + |
173 | 184 | /*
|
174 | 185 | |--------------------------------------------------------------------------
|
175 | 186 | | Leeway
|
|
184 | 195 | | Specify in seconds - only if you know you need it.
|
185 | 196 | |
|
186 | 197 | */
|
| 198 | + |
187 | 199 | 'leeway' => env('JWT_LEEWAY', 0),
|
| 200 | + |
188 | 201 | /*
|
189 | 202 | |--------------------------------------------------------------------------
|
190 | 203 | | Blacklist Enabled
|
|
194 | 207 | | If you do not want or need this functionality, then set this to false.
|
195 | 208 | |
|
196 | 209 | */
|
| 210 | + |
197 | 211 | 'blacklist_enabled' => env('JWT_BLACKLIST_ENABLED', true),
|
| 212 | + |
198 | 213 | /*
|
199 | 214 | | -------------------------------------------------------------------------
|
200 | 215 | | Blacklist Grace Period
|
|
207 | 222 | | Set grace period in seconds to prevent parallel request failure.
|
208 | 223 | |
|
209 | 224 | */
|
| 225 | + |
210 | 226 | 'blacklist_grace_period' => env('JWT_BLACKLIST_GRACE_PERIOD', 0),
|
| 227 | + |
| 228 | + /* |
| 229 | + |-------------------------------------------------------------------------- |
| 230 | + | Show blacklisted token option |
| 231 | + |-------------------------------------------------------------------------- |
| 232 | + | |
| 233 | + | Specify if you want to show black listed token exception on the laravel logs. |
| 234 | + | |
| 235 | + */ |
| 236 | + |
| 237 | + 'show_black_list_exception' => env('JWT_SHOW_BLACKLIST_EXCEPTION', 0), |
| 238 | + |
211 | 239 | /*
|
212 | 240 | |--------------------------------------------------------------------------
|
213 | 241 | | Cookies encryption
|
|
223 | 251 | | Set it to true if you want to decrypt cookies.
|
224 | 252 | |
|
225 | 253 | */
|
| 254 | + |
226 | 255 | 'decrypt_cookies' => false,
|
| 256 | + |
227 | 257 | /*
|
228 | 258 | |--------------------------------------------------------------------------
|
229 | 259 | | Providers
|
|
232 | 262 | | Specify the various providers used throughout the package.
|
233 | 263 | |
|
234 | 264 | */
|
| 265 | + |
235 | 266 | 'providers' => [
|
236 | 267 | /*
|
237 | 268 | |--------------------------------------------------------------------------
|
|
241 | 272 | | Specify the provider that is used to create and decode the tokens.
|
242 | 273 | |
|
243 | 274 | */
|
244 |
| - 'jwt' => Tymon\JWTAuth\Providers\JWT\Lcobucci::class, |
| 275 | + |
| 276 | + 'jwt' => PHPOpenSourceSaver\JWTAuth\Providers\JWT\Lcobucci::class, |
| 277 | + |
245 | 278 | /*
|
246 | 279 | |--------------------------------------------------------------------------
|
247 | 280 | | Authentication Provider
|
|
250 | 283 | | Specify the provider that is used to authenticate users.
|
251 | 284 | |
|
252 | 285 | */
|
253 |
| - 'auth' => Tymon\JWTAuth\Providers\Auth\Illuminate::class, |
| 286 | + |
| 287 | + 'auth' => PHPOpenSourceSaver\JWTAuth\Providers\Auth\Illuminate::class, |
| 288 | + |
254 | 289 | /*
|
255 | 290 | |--------------------------------------------------------------------------
|
256 | 291 | | Storage Provider
|
|
259 | 294 | | Specify the provider that is used to store tokens in the blacklist.
|
260 | 295 | |
|
261 | 296 | */
|
262 |
| - 'storage' => Tymon\JWTAuth\Providers\Storage\Illuminate::class, |
| 297 | + |
| 298 | + 'storage' => PHPOpenSourceSaver\JWTAuth\Providers\Storage\Illuminate::class, |
263 | 299 | ],
|
264 | 300 | ];
|
0 commit comments