Skip to content

Commit ef82cae

Browse files
committed
♻️ refactor: refactor codebase #2
1 parent 660e445 commit ef82cae

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

plugin/src/main/groovy/org/clarify4j/common/annotation/WithAuthHeader.java renamed to plugin/src/main/groovy/org/clarify4j/common/annotation/SagaAuthHeader.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@Documented
66
@Retention(RetentionPolicy.RUNTIME)
77
@Target({ElementType.METHOD, ElementType.TYPE})
8-
public @interface WithAuthHeader {
8+
public @interface SagaAuthHeader {
99
boolean disabled() default false;
1010

1111
String message() default "Access denied";

plugin/src/main/groovy/org/clarify4j/config/handler/WithAuthHeaderHandler.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import org.aspectj.lang.annotation.Aspect;
66
import org.aspectj.lang.reflect.MethodSignature;
77
import org.clarify4j.common.Clarify4j;
8-
import org.clarify4j.common.annotation.WithAuthHeader;
8+
import org.clarify4j.common.annotation.SagaAuthHeader;
99
import org.slf4j.Logger;
1010
import org.slf4j.LoggerFactory;
1111
import org.springframework.security.access.AccessDeniedException;
@@ -20,12 +20,12 @@
2020
public class WithAuthHeaderHandler {
2121
protected static final Logger logger = LoggerFactory.getLogger(WithAuthHeaderHandler.class);
2222

23-
@Around(value = "@annotation(org.clarify4j.common.annotation.WithAuthHeader)")
23+
@Around(value = "@annotation(org.clarify4j.common.annotation.SagaAuthHeader)")
2424
public Object execute(ProceedingJoinPoint joinPoint) throws Throwable {
2525
Object proceed = joinPoint.proceed();
2626
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
2727
Method method = signature.getMethod();
28-
WithAuthHeader auth = method.getAnnotation(WithAuthHeader.class);
28+
SagaAuthHeader auth = method.getAnnotation(SagaAuthHeader.class);
2929
if (auth.disabled()) {
3030
return proceed;
3131
}

0 commit comments

Comments
 (0)