jwt.php
2.16 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
<?php
/**
* ttl:过期时间(秒)
*/
use App\Support\JwtPayloadFormat;
return [
'admin' => [
'iss' => env('APP_URL', ''),
'algorithm' => 'RS256',
'access_ttl' => 7 * 24 * 60 * 60,
'refresh_ttl' => 30 * 24 * 60 * 60,
'access_public' => storage_path('certs/jwt/admin/access/public.key'),
'access_private' => storage_path('certs/jwt/admin/access/private.key'),
'refresh_public' => storage_path('certs/jwt/admin/refresh/public.key'),
'refresh_private' => storage_path('certs/jwt/admin/refresh/private.key'),
'format' => JwtPayloadFormat::class
],
'manage' => [
'iss' => env('APP_URL', ''),
'algorithm' => 'RS256',
'access_ttl' => 7 * 24 * 60 * 60,
'access_public' => storage_path('certs/jwt/manage/access/public.key'),
'access_private' => storage_path('certs/jwt/manage/access/private.key'),
'refresh_ttl' => 30 * 24 * 60 * 60,
'refresh_public' => storage_path('certs/jwt/manage/refresh/public.key'),
'refresh_private' => storage_path('certs/jwt/manage/refresh/private.key'),
'format' => JwtPayloadFormat::class
],
'app' => [
'iss' => env('APP_URL', ''),
'type' => 'Token',
'algorithm' => 'HS256',
'access_ttl' => 90 * 24 * 60 * 60,
'access_secret' => 'django-insecure-z2se)@d6ek9-w9ak4th^gks2mq1mq(t2sg@c(a#0z*$urhy_rh',
'refresh_ttl' => 120 * 24 * 60 * 60,
'refresh_secret' => 'django-insecure-z2se)@d6ek9-w9ak4th^gks2mq1mq(t2sg@c(a#0z*$urhy_rh',
'format' => JwtPayloadFormat::class
],
'user' => [
'iss' => env('APP_URL', ''),
'algorithm' => 'HS256',
'access_ttl' => 30 * 24 * 60 * 60,
'access_secret' => 'django-insecure-z2se)@d6ek9-w9ak4th^gks2mq1mq(t2sg@c(a#0z*$urhy_rh',
'refresh_ttl' => 60 * 24 * 60 * 60,
'refresh_secret' => 'django-insecure-z2se)@d6ek9-w9ak4th^gks2mq1mq(t2sg@c(a#0z*$urhy_rh',
'format' => JwtPayloadFormat::class
]
];