We have a SOAP service implemented using CXF and deployed as a Spring Boot application. We require assistance in adding auth0 support to this service. Unfortunately, we couldn’t find any useful documentation on this topic. Could someone please lend a hand and provide guidance?
Unfortunately we don’t have much content on that front. The only one I was able to find is this:
What I would do if I were you, I would go to our Feedback category here and advocate for that:
Ok, thank you for the response. Anyway, we were able to find a solution !
Can you share it here as well for the benefit of others in community? Thanks!
To describe every steps, will be bit lengthy, so let me summarize.
The main points we need to take care are,
- Create an AuthInterceptor class that implements Interceptor . This interceptor will handle the authentication logic for each incoming SOAP request.
- Configure Apache CXF to use the AuthInterceptor by creating a bean of type Endpoint and setting the interceptor. Here in the handleMessage method we will validate the token, which is the main part of this solution.
- Start your Spring Boot application, and the Auth0 integration should be in place. Incoming SOAP requests will be intercepted by the AuthInterceptor, which will handle the authentication logic based on the provided Auth0 token.
Perfect thanks a lot!