Skip to main content

Jax ws authentication

1 reply [Last post]
Anonymous

My application is using the aikesommer authentication
(http://code.google.com/p/authenticroast/) and extends FORM Authentication

public class CustomAuthenticator extends FormAuthenticator {

@Override
protected boolean checkCredentials(AuthenticationManager am,
AuthenticationRequest ar, String username, String password) {
...
}
}

I am developing JAX-WS in the same application, and I want to achieve
authentication and authorization on every client before getting the
resources.

How can I use the same authentication?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dgodbey
Offline
Joined: 2006-10-27
Points: 0

I don't know that you can. Best I can tell, JAX-WS does not support authentication, rather it relies on Java to handle authentication. To get Java to handle your authentication, you must create and register a java.net.Authenticator class. Since Java supports only single extension, I don't see how you can extend both FormAuthenticator and Authenticator. FormAuthenticator does not derive from java.net.Authenticator.

Good luck!