public <T> void addSecurity(@Observes @WithAnnotations({
            RequiresAuthentication.class, RequiresGuest.class, RequiresPermissions.class,
            RequiresRoles.class, RequiresUser.class, RolesAllowed.class,
            PermitAll.class, DenyAll.class}) ProcessAnnotatedType<T> pat) {
        pat.setAnnotatedType(new AnnotatedTypeWrapper<>(pat.getAnnotatedType(),
                ShiroSecureAnnotated.class.getDeclaredAnnotations()[0]));
    }
Automatically apply Shiro security to all appropriate beans
support/cdi/src/main/java/org/apache/shiro/cdi/ShiroSecurityExtension.java