How to secure a RESTful interface in JBoss AS 7

After successfully migrating my RESTful application to JBoss AS7, I would like to enable authentication again (I used BASIC auth over SSL). It seems like this is now possible without writing an XML configuration, just using annotations.

Unfortunately, I cannot find which maven dependency I need to use to import @WebService and @SecurityContext annotations.

Or is it not at all? Is there a working example somewhere?

Thank you for your help!

+4
source share
1 answer

@ javax.jws.WebService is part of the JDK

You may also need:

org.jboss.ws.api.annotation.WebContext; 

which has the ability to configure authMethod @WebContext (authMethod = AuthMethod.BASIC) and is part of

 <dependency> <groupId>org.jboss.ws</groupId> <artifactId>jbossws-api</artifactId> <version>1.0.0.GA</version> </dependency> 
+1
source

All Articles