REST API authentication and access tokens

As we discussed earlier, all POST and DELETE REST API operations require authentication. In some scenarios, we may have to use authentication even for the GET requests in providing private data. So, authentication becomes the most important and must use aspect in REST API operations in web applications. We identified that Basic Auth is not a secure or recommended way of authenticating your API operations. In this section, we are going to look at the possible ways of integrating REST API authentication:

  • Basic authentication: We used this technique while testing the API requests with Postman app. In this technique, we pass the username and password in a base 64-encoded string within the request header. ...

Get Wordpress Web Application Development - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.