chore: change error report content in frontend (#2603)
diff --git a/docs/en/latest/backend-authentication.md b/docs/en/latest/backend-authentication.md
index 8605aaa..569492d 100644
--- a/docs/en/latest/backend-authentication.md
+++ b/docs/en/latest/backend-authentication.md
@@ -1,3 +1,26 @@
+---
+title: Extensible Authentication
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+-->
+
### How to use this Non-intrusive framework
- **target**: we can use this framework to achieve adding customized authentication method to dashboard
@@ -11,7 +34,7 @@
demoIAMAccess:true
```
- the default strategy where we use the `casbin` framework to achieve. Also, we can add and delete this route in **`internal/pkg/iam/demo/policy.csv`** that only can be accessed by **admin**
+the default strategy where we use the `casbin` framework to achieve. Also, we can add and delete this route in **`internal/pkg/iam/demo/policy.csv`** that only can be accessed by **admin**
2.Adopt a **customized authentication method**
@@ -27,19 +50,22 @@
// in the method Check, you can customize some way to authenticate these interviewers
// if interviewers aren't permitted to request this resource. you can throw an error
type Access interface {
- Check(identity, resource, action string) error
+ Check(identity, resource, action string) error
}
type MyAccess struct{}
-func (m MyAccess)Check(identity, resource, action string) error {
- // customized way
+
+func (m MyAccess) Check(identity, resource, action string) error {
+ // customized way
}
+
func main(){
- // add your customized method into APISIX-DashBoard
- ok := SetAccessImplementation(MyAccess{})
- if ok {
- // add successfully
- } else {
- // there is an existing method in dashboard
+ // add your customized method into APISIX-DashBoard
+ ok := SetAccessImplementation(MyAccess{})
+ if ok {
+ // add successfully
+ } else {
+ // there is an existing method in dashboard
+ }
}
-```
\ No newline at end of file
+```
diff --git a/web/src/constants.ts b/web/src/constants.ts
index f924a05..e0c8086 100644
--- a/web/src/constants.ts
+++ b/web/src/constants.ts
@@ -21,7 +21,7 @@
204: '删除数据成功。',
400: '发出的请求有错误,服务器没有进行新建或修改数据的操作。',
401: '用户没有权限(令牌、用户名、密码错误)。',
- 403: '用户得到授权,但是访问是被禁止的。',
+ 403: '用户得到授权,但无权访问该资源。',
404: '发出的请求针对的是不存在的记录,服务器没有进行操作。',
406: '请求的格式不可得。',
410: '请求的资源被永久删除,且不会再得到的。',