Advertisement

Authentication for Web Services via OAuth

  • Deborah Nolan
  • Duncan Temple Lang
Chapter
Part of the Use R! book series (USE R)

Abstract

Some REST APIs require authentication to access data and services, and many are starting to require use of a more general mechanism named OAuth. This avoids logins and passwords and allows secure three-party interactions between the owner of the data, the application accessing it, and the host of the data and Web service. In this chapter, we describe the OAuth mechanism and how to use the ROAuth package in R to work with REST APIs requiring authentication with OAuth 1.0. We also describe how to work with OAuth 2.0 in R. We illustrate these authentication mechanisms using Dropbox and Google Storage as examples.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [1]
    Amazon Web Services, Inc. Amazon simple storage service (Amazon S3). http://aws.amazon.com/s3/, 2012.
  2. [2]
    Robin Gareus. liboauth: OAuth Library functions, version 1.0.0. http://liboauth.sourceforge.net, 2012.
  3. [3]
    Jeff Gentry and Duncan Temple Lang. ROAuth: R interface for OAuth. http://cran.rproject.org/web/packages/ROAuth/index.html, 2012. R package version 0.9.2.
  4. [4]
    Google, Inc. Google cloud storage: A RESTful service for storing and accessing data on Google’s networking infrastructure. https://developers.google.com/storage/, 2011.
  5. [5]
    Google, Inc. Google APIs console. https://code.google.com/apis/console/, 2012.
  6. [6]
    Google, Inc. Using OAuth 2.0 to access Google APIs. https://developers.google.com/accounts/docs/OAuth2, 2012.
  7. [7]
    Eran Hammer. The OAuth 1.0 guide. http://hueniverse.com/oauth/guide/, 2011.
  8. [8]
    Eran Hammer-Lahav. The OAuth 1.0 Protocol. Internet Engineering Task Force (IETF), 2010. http://tools.ietf.org/html/rfc5849.
  9. [9]
    Johnathan LeBlanc. Programming Social Applications: Building Viral Experiences with OpenSocial, OAuth, OpenID, and Distributed Web Frameworks. O’Reilly Media / Yahoo Press, Sebastopol, CA, 2011.Google Scholar
  10. [10]
    Karthik Ram and Duncan Temple Lang. rDrop: Dropbox R interface. https://github.com/karthikram/rDrop/, 2012. R package version 0.3.
  11. [11]
    Duncan Temple Lang. RCurl: General network (HTTP, FTP, etc.) client interface for R. http://www.omegahat.org/RCurl, 2012. R package version 1.95-3.
  12. [12]
    Duncan Temple Lang. RGoogleStorage: Accessing the Google storage API from R. http://www.omegahat.org/RGoogleStorage, 2012. R package version 0.1-0.

Copyright information

© Springer Science+Business Media New York 2014

Authors and Affiliations

  • Deborah Nolan
    • 1
  • Duncan Temple Lang
    • 2
  1. 1.Department of StatisticsUniversity of CaliforniaBerkeleyUSA
  2. 2.Department of StatisticsUniversity of CaliforniaDavisUSA

Personalised recommendations