QoS匿名访问权限验证扩展
QoS匿名访问权限验证扩展
扩展说明
QoS匿名访问权限验证扩展点。
扩展接口
org.apache.dubbo.qos.permission.PermissionChecker
扩展配置
Dubbo QoS dubbo.application.qos-anonymous-access-permission-level
匿名访问权限校验。
默认实现
org.apache.dubbo.qos.permission.DefaultAnonymousAccessPermissionChecker
扩展示例
Maven 项目结构:
src
|-main
|-java
|-com
|-xxx
|-XxxPermissionChecker.java (实现PermissionChecker接口)
|-resources
|-META-INF
|-dubbo
|-org.apache.dubbo.qos.permission.PermissionChecker` (纯文本文件,内容为:qosPermissionChecker=com.xxx.XxxPermissionChecker)
XxxPermissionChecker.java:
package com.xxx.qos.permission;
import org.apache.dubbo.qos.permission.PermissionChecker;
public class XxxAnonymousAccessPermissionChecker implements PermissionChecker {
@Override
public boolean access(CommandContext commandContext, PermissionLevel defaultCmdRequiredPermissionLevel) {
// ...
}
}
META-INF/dubbo/org.apache.dubbo.qos.permission.PermissionChecker:
qosPermissionChecker=com.xxx.XxxPermissionChecker
最后修改 March 2, 2023: Fix alias forward in docs3-v2 (#2342) (f16c153559)