add docs for casbin backend Signed-off-by: closetool <c299999999@qq.com>
diff --git a/auth_server/authz/casbin_authz.go b/auth_server/authz/casbin_authz.go index e66bd10..94ff0d8 100644 --- a/auth_server/authz/casbin_authz.go +++ b/auth_server/authz/casbin_authz.go
@@ -1,18 +1,16 @@ -/* - Copyright 2020 Cesanta Software Ltd. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ +// Copyright 2021 The casbin Authors. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package authz
diff --git a/auth_server/authz/casbin_authz_test.go b/auth_server/authz/casbin_authz_test.go index 549dfc3..106d805 100644 --- a/auth_server/authz/casbin_authz_test.go +++ b/auth_server/authz/casbin_authz_test.go
@@ -1,3 +1,17 @@ +// Copyright 2021 The casbin Authors. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package authz import (
diff --git a/docs/casbin_backend.md b/docs/casbin_backend.md new file mode 100644 index 0000000..44dfe4d --- /dev/null +++ b/docs/casbin_backend.md
@@ -0,0 +1,15 @@ +# Casbin Backend + +[Casbin](https://github.com/casbin/casbin) is a powerful and efficient open-source access control library written by Golang. It provides support for enforcing authorization based on various access control models. + +## Usage + +add casbin section in yml configuration file + +```yaml +casbin_authz: + model_path: "path/to/model" + policy_path: "path/to/policy" +``` + +more info see: https://github.com/casbin/casbin \ No newline at end of file