JAX-RS OAuthPage edited by Sergey BeryozkinChanges (5)
Full ContentJAX-RS: OAuth IntroductionCXF 2.5.0 implements OAuth 1.0. While OAuth 2.0 (which is very close to becoming the final recommendation) is the next major version of OAuth, OAuth 1.0 is being supported by many providers and the CXF OAuth module should make it easy for developers to start writing OAuth applications, be it OAuth 1.0 or OAuth 2.0 once the latter gets implemented. OAuth offers a complex yet elegant solution toward helping the end users (resource owners) authorize third-party providers to access their resources. The classical OAuth flow is also called a 3-leg OAuth flow as it involves 3 parties: the end user (resource owner), the third party service (client, consumer) and the resource server which is protected by OAuth filters. Typically a consumer offers a service feature that an end user requests and which requires the former to access one or more resources of this end user which are located at the resource server. For example, the consumer may need to access the end user's photos in order to print them and post to the user or read and possibly update a user's calendar in order to make a booking. In order to make it happen, the third-party service application/consumer needs to register itself with the OAuth server. This happens out-of-band and after the registration the consumer gets back a consumer key and secret pair. For example, see this page for one approach. The registrations of third-party application does not have to be very involved for simpler applications. From then on, the typical flows works like this: As you can see the flow can be complex yet it is functional. A number of issues may need to be taken care along the way such as managing expired tokens, making sure that the OAuth security layer is functioning properly and is not interfering with the end user itself trying to access its own resources, etc. CXF JAX-RS gives the best effort to making this process as simple as possible and requiring only a minimum effort on behalf of OAuth server developers. Now, as far this particular 3-leg flow is concerned, OAuth 2.0 simplifies it by effectively making the steps 3 and 6 (requests for request and access tokens) redundant. Moving to OAuth 2.0 will be straightforward after learning how to build OAuth 1.0 servers with CXF. Please check the specification and the Wikipedia article as well as other resources available on the WEB for more information you may need to know about OAuth. Maven dependencies<dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-rs-security-oauth</artifactId> <version>2.5.0</version> </dependency>
Change Notification Preferences
View Online
|
View Changes
|
Add Comment
|
- [CONF] Apache CXF Documentation > JAX-RS OAuth confluence
- [CONF] Apache CXF Documentation > JAX-RS OAuth confluence
- [CONF] Apache CXF Documentation > JAX-RS OAuth confluence
- [CONF] Apache CXF Documentation > JAX-RS OAuth confluence
- [CONF] Apache CXF Documentation > JAX-RS OAuth confluence
- [CONF] Apache CXF Documentation > JAX-RS OAuth confluence
- [CONF] Apache CXF Documentation > JAX-RS OAuth confluence
