Skip to content

Commit

Permalink
fix satoken interceptor annotation binding parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
naah69 committed Oct 12, 2022
1 parent 00bf9e2 commit a1b821d
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.enterprise.util.Nonbinding;
import javax.interceptor.InterceptorBinding;

import cn.dev33.satoken.basic.SaBasicTemplate;
Expand All @@ -28,13 +29,15 @@
*
* @return see note
*/
@Nonbinding
String realm() default SaBasicTemplate.DEFAULT_REALM;

/**
* 需要校验的账号密码,格式形如 sa:123456
*
* @return see note
*/
@Nonbinding
String account() default "";

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.enterprise.util.Nonbinding;
import javax.interceptor.InterceptorBinding;

import cn.dev33.satoken.util.SaTokenConsts;
Expand All @@ -27,20 +28,23 @@
*
* @return see note
*/
@Nonbinding
String type() default "";

/**
* 服务标识 (要校验是否禁用的服务名称)
*
* @return see note
*/
@Nonbinding
String[] value() default { SaTokenConsts.DEFAULT_DISABLE_SERVICE };

/**
* 封禁等级(只有 封禁等级 ≥ 此值 才会抛出异常)
*
* @return /
*/
@Nonbinding
int level() default SaTokenConsts.DEFAULT_DISABLE_LEVEL;

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.enterprise.util.Nonbinding;
import javax.interceptor.InterceptorBinding;

/**
Expand All @@ -25,6 +26,7 @@
*
* @return see note
*/
@Nonbinding
String type() default "";

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.enterprise.util.Nonbinding;
import javax.interceptor.InterceptorBinding;

/**
Expand All @@ -25,20 +26,23 @@
*
* @return 需要校验的权限码
*/
@Nonbinding
String[] value() default {};

/**
* 验证模式:AND | OR,默认AND
*
* @return 验证模式
*/
@Nonbinding
SaMode mode() default SaMode.AND;

/**
* 多账号体系下所属的账号体系标识
*
* @return see note
*/
@Nonbinding
String type() default "";

/**
Expand All @@ -56,6 +60,7 @@
*
* @return /
*/
@Nonbinding
String[] orRole() default {};

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.enterprise.util.Nonbinding;
import javax.interceptor.InterceptorBinding;

/**
Expand All @@ -25,13 +26,15 @@
*
* @return 需要校验的角色标识
*/
@Nonbinding
String[] value() default {};

/**
* 验证模式:AND | OR,默认AND
*
* @return 验证模式
*/
@Nonbinding
SaMode mode() default SaMode.AND;

/**
Expand All @@ -41,6 +44,7 @@
*
* @return see note
*/
@Nonbinding
String type() default "";

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.enterprise.util.Nonbinding;
import javax.interceptor.InterceptorBinding;

/**
Expand All @@ -26,6 +27,7 @@
*
* @return see note
*/
@Nonbinding
String type() default "";

}

0 comments on commit a1b821d

Please sign in to comment.