Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Security and authentication in web services

Lets say we have a website that uses a web service for all of its functionality (i.e. retrieving and updating data from/to db), how does the web service authenticate requests?

As I understand it, in a traditional java "website" a user provides a username & password, and upon validation a jsessionid is assigned to the user (client browser). Every time the client browser asks the website for something, the site checks for the jsessionid ensuring that the user is registered and authenticated. Is there a web services equivalent of this? If yes, what?

like image 267
King Avatar asked Apr 19 '10 22:04

King


1 Answers

Usually for web services the most easy solution is using Basic Authentication. For something more complex, "Api Key\Token" are passed with each request to authorize\authenticate the users. Another solution is OAuth.

Twitter for example use Basic Authentication and OAuth.

like image 93
Andrea Avatar answered Sep 22 '22 20:09

Andrea