PHP Microservices: Authentication and Authorization

Devin Dixon
Helium MVC
5 min readJan 7, 2019

--

With the complexity of microservices, security becomes a harder issue to address because there are so many areas to tackle the issue:

  • At the network layer that normally involves private networks, VPNs, etc
  • If Restful API, at the endpoint and is usually performed with OAuth or JSON WebTokens
  • At the application layer that checks communication between microservices

This tutorial will ONLY focus on securely transmitting information between microservices using a token authentication. Token will be a single-use token and also authorize actions.

Run The Code

The code for this tutorial is available at: https://github.com/ProdigyView-Toolkit/Microservices-Examples-PHP

Use the folder named security and follow the README.

Learning From Prior Tutorials

This tutorial is a build-up from prior tutorials that cover PHP and Microservices. It is suggested to have an understanding of the concepts while trying to learn the information discussed here.

--

--