com.lx.boot.web.annotation.Auth Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lxboot3 Show documentation
Show all versions of lxboot3 Show documentation
使用文档: https://a7fi97h1rc.feishu.cn/docx/X3LRdtLhkoXQ8hxgXDQc2CLOnEg?from=from_copylink
package com.lx.boot.web.annotation;
import com.lx.annotation.Note;
import java.lang.annotation.*;
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
@Note("接口权限验证, 作用于Controller的类或者方法上")
public @interface Auth {
@Note("参数为false 不进行登录验证")
boolean value() default true;
@Note("将调用者UserType与参数进行正则匹配,正确即可通过!")
String allowUserTypeRegex() default "";
@Note("将调用者IP与 OS.getProperty(key) 进行正则匹配,正确即可通过!")
String ipWhiteListRegexApplicationKey() default "";
@Note("根据用户ID+url限制调用次数, 参数参考正则(1/5s):次数/时间 [1-9]\\d{0,5}/([M,d]|([1-9]\\d{0,3}[H,m,s]))")
String callNumberByUser() default "";
@Note("根据IP+url限制调用次数, 参数参考正则(1/5s):次数/时间 [1-9]\\d{0,5}/([M,d]|([1-9]\\d{0,3}[H,m,s]))")
String callNumberByIp() default "";
@Note("系统接口, 根据header中 SYS_AUTHORIZATION,SYS_AUTHORIZATION_TIMESTAMP 判断身份!")
boolean isSysMethod() default false;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy