Skip to content

Commit e0ddc63

Browse files
committed
Remove casbin.conf in README.
1 parent 7047e68 commit e0ddc63

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,29 @@ Caddy-authz is an authorization middleware for [Caddy](https://github.com/mholt/
1111

1212
```
1313
http://localhost:80 {
14-
authz "path/to/casbin.conf"
14+
authz "/folder/to/caddy_binary/authz_model.conf" /folder/to/caddy_binary/authz_policy.csv"
1515
...
1616
}
1717
```
1818

19-
The ``authz`` directive specifies the path to Casbin config file, the name of which is usually ``casbin.conf``. For how to write the ``casbin.conf``, please refer to: https://github.com/casbin/casbin#get-started
20-
21-
Note: To use Casbin, you also need a model file which describes your access control model, and a policy file which describes your authorization policies (if you store policy into a file, Another option is DB).
19+
The ``authz`` directive specifies the path to Casbin model file (.conf) and Casbin policy file (.csv). The Casbin model file describes access control models like ACL, RBAC, ABAC, etc. The Casbin policy file describes the authorization policy rules. For how to write these files, please refer to: https://github.com/casbin/casbin#get-started
2220

2321
## A working example
2422

2523
1. ``cd`` into the folder of ``caddy`` binary.
2624

2725
2. Put your Casbin model file [authz_model.conf](https://github.com/casbin/caddy-authz/blob/master/authz_model.conf) and Casbin policy file [authz_policy.csv](https://github.com/casbin/caddy-authz/blob/master/authz_policy.csv) into this folder.
2826

29-
3. Put your Casbin config file [casbin.conf](https://github.com/casbin/caddy-authz/blob/master/casbin.conf) into this folder. You should specify your own paths to Casbin model file and policy file in Casbin config file.
30-
31-
4. Add ``authz`` directive to your Caddyfile like:
27+
3. Add ``authz`` directive to your Caddyfile like:
3228

3329
```
3430
http://localhost:80 {
35-
authz "/folder/to/caddy_binary/casbin.conf"
31+
authz "authz_model.conf" "authz_policy.csv"
3632
root "/my-website.net"
3733
}
3834
```
3935

40-
5. Run ``caddy`` and enjoy.
36+
4. Run ``caddy`` and enjoy.
4137

4238
Note: This plugin only supports HTTP basic authentication to get the logged-in user name, if you use other kinds of authentication like OAuth, LDAP, etc, you may need to customize this plugin.
4339

0 commit comments

Comments
 (0)