Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a standard way to authenticate applications to your web API?

I'm looking at building a simple web app that will expose an API that lets third-party (well, written by me, but that's not the point) apps query for and modify user-specific data stored on the site.

Obviously I don't want to allow apps to be able to get user-specific information without that users consent. I would want some kind of application authentication where users allow an application they run to use the web API to access their information.

Is there a standard way to achieve this or does every app (i.e. rememberthemilk) just hack up a bespoke solution specifically for them?

like image 801
SCdF Avatar asked Sep 25 '08 09:09

SCdF


People also ask

How do I provide authentication in Web API?

Web API assumes that authentication happens in the host. For web-hosting, the host is IIS, which uses HTTP modules for authentication. You can configure your project to use any of the authentication modules built in to IIS or ASP.NET, or write your own HTTP module to perform custom authentication.

How many ways can you authenticate Web API?

There are three ways to authenticate users when calling a web API: API key authentication. Basic authentication. Session-based authentication.


1 Answers

Will OAuth work for you? That's the problem it was designed to solve.

like image 133
Hank Gay Avatar answered Sep 27 '22 03:09

Hank Gay