How do you protect the Apache CXF RESTful API?

Is there an easy way to protect a RESTful API open through an Apache CXF JAX-RS implementation? Are there any security hooks through Spring Security ?.

I heard about people using Basic Authentication over HTTPS, but I have not seen any real examples. Any ideas would be greatly appreciated.

Thank!

+3
source share
2 answers

I do not know about CXF, but in Resteasy you can configure it the same way as for any other web application, and then do it ..

@Context private SecurityContext sc;

, sc.isUserInRole("admin");. CXF .

0

Source: https://habr.com/ru/post/1750744/


All Articles