21
Sean Sullivan Portland Java User Group March 17, 2009 OAuth and REST web services

OAuth and REST web services

  • Upload
    sullis

  • View
    20.285

  • Download
    2

Embed Size (px)

DESCRIPTION

OAuth and REST web services Portland Java User Group Portland, Oregon March 17 2009

Citation preview

Page 1: OAuth and REST web services

Sean SullivanPortland Java User Group

March 17, 2009

OAuth and REST web services

Page 2: OAuth and REST web services
Page 3: OAuth and REST web services

http://en.wikipedia.org/wiki/Representational_State_Transfer

Representational state transfer (REST) is a style of software architecture for distributed hypermedia systems such as the World Wide Web. As such, it is not strictly a method for building "web services." The terms "representational state transfer" and "REST" were introduced in 2000 in the doctoral dissertation of Roy Fielding, one of the principal authors of the Hypertext Transfer Protocol (HTTP) specification.

Page 6: OAuth and REST web services

REST web service API’s

Page 7: OAuth and REST web services

http://roy.gbiv.com/untangled/2008/no-rest-in-cmis

“REST is an architectural style, not a protocol”

Roy FieldingSeptember 2008

Page 8: OAuth and REST web services

REST +

• Jersey

• JBoss RESTEasy

• Apache CXF

• Restlet

• Spring 3.0

Page 9: OAuth and REST web services

• Restlet API

• JAX-RS API

• Restlet client API

Page 10: OAuth and REST web services

• org.restlet.Application

• org.restlet.resource.Resource

• org.restlet.Restlet

• org.restlet.representation.Representation

• org.restlet.representation.Variant

• org.restlet.ext.servlet.ServerServlet

Page 11: OAuth and REST web services

JAX-RS

• Java API for RESTful web services

• JSR-311

• https://jsr311.dev.java.net

Page 12: OAuth and REST web services

Restlet configuration

“As XML has been frequently overused as an alternative programming language, in the Restlet framework we are very careful about this. We think that any configuration that must be done by an application developer should be done in Java.”

http://www.restlet.org/documentation/1.1/faq

Page 13: OAuth and REST web services

“An open protocol to allow secure API authorization in a simple and standard method from desktop and web applications”

http://oauth.net

Page 14: OAuth and REST web services

• use OAuth to access protected data

• your application needs to obtain an access token from the service provider

• service provider will issue access token after the user grants permission

Page 15: OAuth and REST web services

http://twitter.com/oauth_clients

Page 17: OAuth and REST web services

http://code.google.com/p/oauth

+

Page 18: OAuth and REST web services

• net.oauth.OAuthAccessor

• net.oauth.OAuthConsumer

• net.oauth.OAuthMessage

• net.oauth.client.OAuthClient

• net.oauth.client.httpclient4.HttpClient4

+

Page 19: OAuth and REST web services

XML response

HTTP request

Page 20: OAuth and REST web services

Open source projects

code.google.com/p/jfireeagle

code.google.com/p/jpoco

code.google.com/p/meetup-java-client

code.google.com/p/friendfeed-java-api

code.google.com/p/twilio-java-client

Page 21: OAuth and REST web services

Thank you