M
M
Moro Zota2018-07-20 19:18:00
JSON Web Token
Moro Zota, 2018-07-20 19:18:00

How to use jwt?

Hello. Help to understand
As I understand, it is necessary to have two not interconnected servers. Server with tokens and the application itself.
The Jwt server should parse the post, zip it up, and send it back to the client. that is, the token itself
. And what's next?
Please explain in detail and correct where wrong.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shvets, 2018-07-20
@morozota

Not necessary. JWT is an encrypted token format.
The server takes some identifying information, encrypts it, sends the token (a simple string) to the client.
The client sends this string in each of its requests (usually in the Authorization HTTP header).
The server, having received a request, decrypts the token and understands from which user the request came.
The token has an expiration date, i.e. allows you to turn off access to the user at some point and not issue new tokens.
The number of servers is not defined anywhere here, just with a lot of traffic, you can take out the decryption of the token on a separate server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question