Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (26 sloc) 1.21 KB
package ca.ljz.winter.security.annotations;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import javax.enterprise.util.Nonbinding;
import javax.interceptor.InterceptorBinding;
import ca.ljz.winter.security.handlers.AuthenticationExceptionHandler;
import ca.ljz.winter.security.handlers.AuthorizationExceptionHandler;
import ca.ljz.winter.security.handlers.ResponseAuthenticationExceptionHandler;
import ca.ljz.winter.security.handlers.ResponseAuthorizationExceptionHandler;
@Inherited
@InterceptorBinding
@Retention(RUNTIME)
@Target({ TYPE, METHOD })
public @interface PermissionCheck {
String value() default "";
@Nonbinding
String[] privilegedRoles() default {};
@Nonbinding
String[] privilegedUsers() default {};
Class<? extends AuthenticationExceptionHandler> AuthenticationExceptionHandler() default ResponseAuthenticationExceptionHandler.class;
Class<? extends AuthorizationExceptionHandler> AuthorizationExceptionHandler() default ResponseAuthorizationExceptionHandler.class;
}