[OSM-dev] API suggestion - "authorise"?

Tom Hughes tom at compton.nu
Sat Nov 17 10:39:52 GMT 2007


In message <200711170905.18363.nick at hogweed.org>
          Nick Whitelegg <nick at hogweed.org> wrote:

> Doesn't look like you can do this at the moment but what would be good to
> have  in the API is an "authorise" call which will do nothing but take a
> username  and password and return either 200 OK if OK, or 401 if invalid.
> This would  make it easier for client sites which use the API to perform
> modifications to  add an OSM login, as the user could get instant feedback
> as to whether the  login was incorrect, as opposed to waiting until they
> actually edit  something.

You certainly can do it - both trac and the forum make use of it.

In principle any API call will do as you will get a 401 response if
the credentials you provide are no good.

The recommended way is to use /api/0.5/user/details which will return
a small XML document giving some details of the user, and will obviously
fails if the HTTP authentication credentials are not valid.

Tom

-- 
Tom Hughes (tom at compton.nu)
http://www.compton.nu/




More information about the dev mailing list