I think you guys are better suited to knowing the "right way" forward :)

I'm honestly surprised I got it working, I barely understand all this, I looked at your ShiroSecurityExtension class and the processor from the Omnifaces Quarkus extension for some pointers: https://github.com/quarkiverse/quarkus-omnifaces/blob/main/deployment/src/main/java/io/quarkiverse/omnifaces/deployment/OmnifacesProcessor.java

In the Quarkus CDI reference it says:
"Quarkus incorporates build-time optimizations in order to provide instant startup and low memory footprint. The downside of this approach is that CDI Portable Extensions cannot be supported. Nevertheless, most of the functionality can be achieved using Quarkus extensions <https://quarkus.io/guides/writing-extensions>. See the integration guide <https://quarkus.io/guides/cdi-integration> for more information."

So I don't know the difference between a "build compatible" extension and a "portable" extension, but Quarkus is saying portable extensions can not work.

I'd be happy to share the couple @BuildSteps I'm using to get the security annotations working.  I also copied and slightly edited (just to make public) a few files from the cdi module into my extension project (ShiroSecurityInterceptor, ShiroSecureAnnotation and AopHelper).  I *think* if the ShiroSecureAnnotation were public I wouldn't need any of that but I need to reference that annotation class to add it to classes/methods in the BuildStep in a similar way you guys do in the CDI Extension so the interceptor works.

Taking another look, I imagine there's some more work that could be done to put the functionality of the shiro-jakarta-ee module into the extension.  There's probably more stuff I'm missing that I'm not even realizing (which yeah, there's another CDI Extension in there...).  And I'm not even worrying about "native" mode at all yet, which is another place the Quarkus extensions help out/make things work.

I'd be happy to help in whatever way I can.

Dave

On 3/10/2025 11:56 AM, [email protected] wrote:
Hi,

I have mixed feelings about this one. On one hand, it’s great to have an 
extension,
on the other hand, I would personally prefer build-compatible portable CDI 
extension.
I do believe that portable BCE work correctly on Quarkus, without making a 
proprietary extension.
This would also work with Helidon, and maybe Micronaut to boot.

In any case, we would consider anything you could donate to Shiro.

What do you think?

Reply via email to