authentication - Implementing Security for Java Web Services with Spring and Apache CXF -


i have application runs on java spring 3. application uses restful services , spring security security. has user table , checks user credentials it. implemented web service capability application(one of customer's wanted web services instead of restful services). if possible want same authentication mechanism , want database , allow 1 user (for now-to admin) communicate web service server.

should follow same way restful authentication or there authentication , security mechanism java web services @ spring (i.e. how deal logout, how enable logout mechanism client-server web services communication)

ps: use apache-cxf.

two potential ways:

  1. put basicauthenticationfilter or digestauthenticationfilter in front of cxf servlet.

  2. use ws-security usernamepasswordtoken cxf , write callbackhandler a) creates usernamepasswordauthenticationtoken, b) calls authenticationmanager.authenticate() , c) stores authentication in securitycontextholder.

note above doesn't cover concept of logout since login sessions implemented cookies , above stateless approaches. if need logout should consider using oauth because can implement logout invalidating access tokens.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -