Questions:
- How do you verify that a user has access to a function of a microservice?
- What is a good lifespan for an access token?
- Why is JSON a good choice for the inputs and outputs of microservices?
Answers:
- A JSON Web Token (JWT) middleware (SimpleJWTMiddleware) verifies that only permitted users can access a function of a microservice.
- This depends on the case. Some cases warrant 60 seconds, while others can have a lifespan of multiple hours or even days.
- Because it is universally readable and lots of libraries support it well in many programming languages and environments.