If you don’t mind going beyond the JSR-311 spec, the best way to handle this 
kind of security checks is using CXF interceptors [1], i.e., you check the HTTP 
headers in your own interceptor, if the security criteria is not satisfied, you 
simply stop the inbound interceptor chain and return.

[1]. http://cwiki.apache.org/CXF20DOC/interceptors.html

Cheers,
Jervis

> -----Original Message-----
> From: Todd Orr [mailto:[EMAIL PROTECTED]
> Sent: 2008年1月9日 3:36
> To: [email protected]
> Subject: Re: Rest Header Info
> 
> Thanks. I'm using jsr311 so that's mixed news. I voted on that issue,
> however I'll need to formulate a workaround in the meantime. I suppose
> I'll need to create objects that include the security information
> along with the required data for the method execution. This is
> acceptable in posts, and puts, however the gets and deletes will now
> require parameters be passed through the URL. So that'll be ugly. Arg.
> 
> On Jan 8, 2008 3:21 AM, Liu, Jervis <[EMAIL PROTECTED]> wrote:
> > Are you using CXF HTTP Binding to build your REST service, or CXF JAX-RS
> (JSR-311) instead?
> >
> > In CXF JAX-RS (JSR-311), the standard way to access HTTP headers is using
> @HeaderParam, like below:
> >
> >     @HttpMethod("GET")
> >     @UriTemplate("/books/{bookId}/")
> >     public Book getBook(@UriParam("bookId") String id, @HeaderParam
> ("httpheaderName") String headerValue) {
> >         ....
> >     }
> >
> > Of course, this @HeaderParam feature is not implemented yet in CXF :-).
> But can be supported very quickly if people started asking for it. See JIRA
> https://issues.apache.org/jira/browse/CXF-1011
> >
> > Cheers,
> > Jervis
> >
> >
> > > -----Original Message-----
> > > From: Todd Orr [mailto:[EMAIL PROTECTED]
> > > Sent: 2008年1月8日 12:19
> > > To: [email protected]
> > > Subject: Rest Header Info
> > >
> > > I need to get some header info during REST requests for security
> > > checks. I tried to use the @Resource WebServiceContext method
> > > described in the WS documents but quickly learned that this doesn't
> > > work. Is there any method for RESTful services to do this?
> >
> > ----------------------------
> > IONA Technologies PLC (registered in Ireland)
> > Registered Number: 171387
> > Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
> >

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

Reply via email to