[jetty-users] Jetty JAX-WS Context handler and authentication

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[jetty-users] Jetty JAX-WS Context handler and authentication

ny07636
Hi,
    I’ve recently successfully implemented a JAX-WS service using Jetty 8 ( 8.0.4 ) and the JAXWS2SPI package ( 7.0.1 ).   Jetty is embedded and configuration is done through code rather than xml.  I’m using an Endpoint to publish the service.  This works perfectly ( Jetty is a great tool ).
 
However has anyone been able to successfully implement authentication ( BASIC or higher even ) when using an Endpoint and the JAXWS2SPI package ?
 
I’ve been able to get authentication working for servlets in Jetty without any problems using “server.addBean(myLoginService)”.   This works perfectly for servlets but not for the web service,  I’ve determine that the login service is not actually being accessed by Jetty. 
 
I’ve also tried using a ConstraintSecurityHandler instead of addBean(myLoginService) without any luck,  it seems that I need to set a handler for ConstraintSecurityHandler but I’m unsure what it should be,  I don't have access to the JAXWS2ContextHandler as its injected at runtime and there is no way to get a reference to it.
 
I’m sure with both of these methods I am doing something stupid or at least just wrong, but I cant find any good documentation on either at the moment.   I can provide code if needed but didnt want to overcomplicate the email.
 
Any help would be appreciated.
 
Thanks in advance
 

_______________________________________________
jetty-users mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-users] Jetty JAX-WS Context handler and authentication

Henrik Gustafsson

On Jan 7, 2012, at 17:36 , ny07636 wrote:

> Hi,
>     I’ve recently successfully implemented a JAX-WS service using Jetty 8 ( 8.0.4 ) and the JAXWS2SPI package ( 7.0.1 ).   Jetty is embedded and configuration is done through code rather than xml.  I’m using an Endpoint to publish the service.  This works perfectly ( Jetty is a great tool ).
>  
> However has anyone been able to successfully implement authentication ( BASIC or higher even ) when using an Endpoint and the JAXWS2SPI package ?

I think you might have run into this:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=365947

// Henrik
_______________________________________________
jetty-users mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-users