Tuesday, November 1, 2011

All you need to get HTML views is RequestDispatcherProvider

While working on the new OAuth demo for the soon to be released Talend TSF distro based on Apache CXF 2.5.0 (see Dan's announcement), I relied a lot on RequestDispatcherProvider.

As you know a typical OAuth flow may involve a lot of interacting with the user and a complete demo should also show the user going to or being redirected to the 3rd party provider site, as well as approving the 3rd party accessing one or more of its private resources.

I was amazed, I really was, how simple and easy it was to get multiple RequestDispatcherProvider instances configured to redirect all sort of responses to JSP views handlers while still being able to return alternative representations such as XML ones.

I highly encourage people to try RequestDispatcherProvider, say goodbye to complex views integrations and never look back.

7 comments:

Chris Dolan said...

I can't seem to find the OAuth demo after searching the CXF svn. Maybe I missed it? Could you provide a link? Thanks!

Chris Dolan said...

Oh, I think I found it: https://github.com/Talend/tsf/tree/master/examples/jaxrs-oauth

Sergey Beryozkin said...

Hi - I'm actually going to doc it today - README is a copy&paste from the other demo at the moment

Unknown said...

Thank Sergey for pointing to RequestDispatcherProvider. I was trying to figure out how to do the same with Spring security OAuth and CXF and thought the only way would be to redirect from JSP to some html and then probably to make those look like a rest url ,do a rewrite for html. That was just an idea and glad I landed on you blog while taking a look at what CXF was offering for security. Very helpful blog. Thanks for all these posts.

Unknown said...

Hi Sergey,

Apache CXF site says “new security capabilities for JAX-RS services”. Is it the RequestDispatcherProvider mentioned on your blog http://sberyozkin.blogspot.com/2011/11/all-you-need-to-get-html-views-is.html or is there more to that announcement.
Could you please highlight the features if any other ?
Just a little anxious to lean as we are at the point of implementing security for our JAX-RS CXF application.

regards,
Ramesh

Sergey Beryozkin said...

Hi, I'm going to blog about it all next week, it's to do with the initial OAuth, SAML and XML security support

Unknown said...

Thanks again. Sounds great. Eager to read about the new features.

regards,
Ramesh