cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nizarrazin <nizar.chaoua...@gmail.com>
Subject Re: Extract client information in the service side
Date Thu, 11 Oct 2012 14:08:32 GMT
Hello Andrei,

Thank you for your response.
I want in the service side detect which client trying to connect to this
service.
In other words, I want if possible catch the alias of the client
certificate in the service interceptor that I can load it in the service
keystore and have the information I need.

Thanks
Regards

2012/10/11 Andrei Shakirin [via CXF] <
ml-node+s547215n5716393h51@n5.nabble.com>

> Hi Nizar,
>
> Not sure what you exactly mean under service Callback, but you can use
> following code in interceptors or service implementation to get client
> principal:
>
> Interceptor:
>         SecurityContext sc = message.get(SecurityContext.class);
>         Principal principal = sc.getUserPrincipal();
>
> Service implementation:
>         @Resource
>         WebServiceContext webServiceContext;
>
>   SecurityContext sc =
> webServiceContext.getMessageContext().get(SecurityContext.class);
>   Principal principal = sc.getUserPrincipal();
>
> Reagrds,
> Andrei.
>
> -----Original Message-----
> From: nizarrazin [mailto:[hidden email]<http://user/SendEmail.jtp?type=node&node=5716393&i=0>]
>
> Sent: Mittwoch, 10. Oktober 2012 17:47
> To: [hidden email] <http://user/SendEmail.jtp?type=node&node=5716393&i=1>
> Subject: Extract client information in the service side
>
> Hello everyone,
>
> I have run a simple App using WSS4j and Apache CXF, I used x509
> certificate to sign message, and every thing works well.
> Now I want to extract in service CallBack some informations (alias for
> example) of the connecting client.
> Is that possible, how to do that?
>
> Thanks
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Extract-client-information-in-the-service-side-tp5716307.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://cxf.547215.n5.nabble.com/Extract-client-information-in-the-service-side-tp5716307p5716393.html
>  To unsubscribe from Extract client information in the service side, click
> here<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5716307&code=bml6YXIuY2hhb3VhY2hpQGdtYWlsLmNvbXw1NzE2MzA3fC01OTkwOTY2MzY=>
> .
> NAML<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
Nizar Chaouachi
Software engineer
Tel :+33 0617504612




--
View this message in context: http://cxf.547215.n5.nabble.com/Extract-client-information-in-the-service-side-tp5716307p5716395.html
Sent from the cxf-user mailing list archive at Nabble.com.

Mime
View raw message