feat(core): 新增 Feature Ticket 鉴权体系与任务执行接口
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package com.yupi.springbootinit.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Feature Ticket 校验注解
|
||||
* 标注在需要 Ticket 校验的接口方法上
|
||||
*
|
||||
* @author ziin
|
||||
*/
|
||||
@Target({ElementType.METHOD, ElementType.TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface RequireFeatureTicket {
|
||||
|
||||
/**
|
||||
* 需要的功能代码,为空时不校验功能代码
|
||||
*/
|
||||
String featureCode() default "";
|
||||
|
||||
/**
|
||||
* 设备 ID 的请求头名称
|
||||
*/
|
||||
String machineIdHeader() default "X-Machine-Id";
|
||||
|
||||
/**
|
||||
* Ticket 的请求头名称
|
||||
*/
|
||||
String ticketHeader() default "X-Feature-Ticket";
|
||||
}
|
||||
Reference in New Issue
Block a user