private void checkPermissions(final InvocationContext ctx) throws Exception {
        List<SecurityInterceptor> siList = AopHelper.createSecurityInterceptors(ctx.getMethod(),
                ctx.getMethod().getDeclaringClass());
        siList.forEach(SecurityInterceptor::intercept);
    }
Enforce Shiro security on EJBs and CDI Beans
support/cdi/src/main/java/org/apache/shiro/cdi/ShiroSecurityInterceptor.java