© Sanjay Patni 2017

Sanjay Patni, Pro RESTful APIs, 10.1007/978-1-4842-2665-0_8

8. API Security and Caching

Sanjay Patni

(1)UCSC Excention, Santa Clara, California, USA

In this chapter we will start with the review of the OAuth 2 standard for securing RESTful APIs and do an exercise on implementing basic Spring security. We will then review caching concepts.

API Security - OAuth 2

OAuth 2 is a standard for delegating authorization for accessing resources by HTTP

With OAuth, we can give access rights to the mobile apps without giving a password. Instead, a token is handed over to the application. A token repesents access rights for the subset of data for a short time frame. Please refer to https://oauth.net/2/ for general information about OAuth 2. ...

Get Pro RESTful APIs: Design, Build and Integrate with REST, JSON, XML and JAX-RS now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.