Answer the question
In order to leave comments, you need to log in
Security of requests from third-party services
The title probably does not quite reflect the essence of my stupor. And the problem is this: I started making a web engine based on the API. And everything would be fine, but the moment has come when other services (unverified) need to work with the API. The problem is that, having authorized on a third-party service, the user will be in danger, because. the third-party service will be able to perform any action from the user. I know that there is OAuth and the like, but I would like to make such a system myself. Can you tell me where to read?
Answer the question
In order to leave comments, you need to log in
The service must make a request like api .****.su/?token=***&method=***&data=***, authorization is by token. Another service gets only the token, the login and password are entered on the side of your site.
Everything is written in more detail in the OAuth protocol - it solves exactly this problem.
Let him authorize with you, and either sign the data to a third-party server or transfer it through a closed channel.
Take OAuth 2 legged. Very simple solution based on preshared key (shared password). There are libraries for both the client and the server. My pure-php code (without using any) libraries did not weigh even 10 kilobytes.
api .****.su/?method=login.login&data={"email":"****","password":"******"}&sid=SID12345
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question