S
S
Sergei Iamskoi2014-12-25 11:06:06
RESTful API
Sergei Iamskoi, 2014-12-25 11:06:06

How to log in using the API?

You need to write authorization through RESTApi. I understand the logic behind these things. So far I see this way:
1) The application sends the login \ password via https to the REST server.
2) The server makes a select in the database. If all goes well, creates a unique key in the session table paired with the user id.
3) Returns this key (token) back to the client
4) Next, the client works with the server by sending its requests, which also include the received token.
5) The server selects the user already by the token. Temporary restrictions on the token are possible, but these are goodies.
Is this the correct authorization scheme? Or are there smarter, more correct ones?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Entelis, 2014-12-25
@DmitriyEntelis

Quite normal.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question