REST API and Security

I plan to make a unified JSON REST API for my javascript based web application and an API for other developers.

What I would like to do is make my js application authenticate users using username / password and allow them access to their personal resources. When the API is available to other developers, I would like to allow them access to public resources (while still being able to track their use of the API), and also allow them to access the user's personal data with user permissions (authorization?).

Now, how will I build such an API? What libraries / protocols / ... would be the best in this?

Thanks.

+4
source share
1 answer

You really have to check out Oauth. Take a look at http://oauth.net

0
source

Source: https://habr.com/ru/post/1440369/


All Articles