forked from php-casbin/laravel-authz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlauthz.php
70 lines (55 loc) · 1.59 KB
/
lauthz.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
<?php
return [
/*
*Default Lauthz driver
*/
'default' => 'basic',
/*
* Lauthz Localizer
*/
'localizer' => [
// changes whether enforcer will register at gates.
'enabled_register_at_gates' => true
],
'basic' => [
/*
* Casbin model setting.
*/
'model' => [
// Available Settings: "file", "text", "url"
'config_type' => 'file',
'config_file_path' => __DIR__ . DIRECTORY_SEPARATOR . 'lauthz-rbac-model.conf',
'config_text' => '',
'config_url' => ''
],
/*
* Casbin adapter .
*/
'adapter' => Lauthz\Adapters\DatabaseAdapter::class,
/*
* Database setting.
*/
'database' => [
// Database connection for following tables.
'connection' => '',
// Rule table name.
'rules_table' => 'rules',
],
'log' => [
// changes whether Lauthz will log messages to the Logger.
'enabled' => false,
// Casbin Logger, Supported: \Psr\Log\LoggerInterface|string
'logger' => 'log',
],
'cache' => [
// changes whether Lauthz will cache the rules.
'enabled' => false,
// cache store
'store' => 'default',
// cache Key
'key' => 'rules',
// ttl \DateTimeInterface|\DateInterval|int|null
'ttl' => 24 * 60,
],
],
];