C
C
chincharovpc2021-03-05 15:42:43
RESTful API
chincharovpc, 2021-03-05 15:42:43

How to design Rest correctly?

Good afternoon!
It is necessary to remove Authentication from the main server in order to use it for other services in the future.
I roughly drew a diagram
6042233676e68310993973.png

How do I now check the token in Middleware in Brocker? With each request, ask Auth for the validity of the token?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-03-05
@vabka

If the token can be revoked, then yes - for each request you will have to check if it is valid.
If it is impossible to revoke, then you can see the expiration date in the token itself (JWT)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question