@Target(value={PARAMETER,ANNOTATION_TYPE}) @Retention(value=RUNTIME) @Documented public @interface AuthenticationPrincipal
Authentication.getPrincipal()
to a method argument.AuthenticationPrincipalArgumentResolver
Modifier and Type | Optional Element and Description |
---|---|
boolean |
errorOnInvalidType
True if a
ClassCastException should be thrown
when the current Authentication.getPrincipal() is the incorrect
type. |
public abstract boolean errorOnInvalidType
ClassCastException
should be thrown
when the current Authentication.getPrincipal()
is the incorrect
type. Default is false.