Skip to content

Commit

Permalink
[#4] Auth Custom Annotation 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
jun108059 committed Oct 17, 2021
1 parent 7d84066 commit c836384
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.teamnexters.lazy.common.annotation;

import org.springframework.security.core.annotation.AuthenticationPrincipal;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.PARAMETER)
@AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member")
public @interface AuthUser {

}

0 comments on commit c836384

Please sign in to comment.