-
Couldn't load subscription status.
- Fork 6.2k
Closed
Labels
in: coreAn issue in spring-security-coreAn issue in spring-security-coretype: enhancementA general enhancementA general enhancement
Milestone
Description
It would be nice if we could improve the support of @AuthenticationPrincipal meta-annotations to align with method security. For example, the following doesn't appear to work:
@Retention(RetentionPolicy.RUNTIME)
@AuthenticationPrincipal
public @interface CurrentUser {
@AliasFor(annotation = AuthenticationPrincipal.class)
String expression() default "";
}@CurrentUser(expression = "id") Long currentUserIdIt would be nice to also support something like this:
@Retention(RetentionPolicy.RUNTIME)
@AuthenticationPrincipal("principal.{property}")
public @interface CurrentUser {
String property() default "";
}la3rence
Metadata
Metadata
Assignees
Labels
in: coreAn issue in spring-security-coreAn issue in spring-security-coretype: enhancementA general enhancementA general enhancement