V
V
Vocler2019-07-12 21:30:51
Yii
Vocler, 2019-07-12 21:30:51

What is accessToken and authToken and what is the difference?

In the basic Yii2 example, the user has two columns - accessToken and authToken.
They are not described in the documentation.
Why are they needed and what is the difference between them?
As I understand it, the logic is something like this: at the time of user authorization, he receives a randomly generated accessToken. After that, it writes this accessToken in cookies and passes it in the header with each request, so the application understands which user is accessing it. I'm right?
Then why is authKey needed?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2019-07-13
@xmoonlight

accessToken - session token (it is always created inside authToken)
authToken - authorization token (creates a user session based on protocol and authentication data)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question