Perl Dancer Auth solution supporting API keys?

I have a web application for dancers, which is part of the website and part of the web service; certain routes in my application must have auth on them.

All auth solutions that I found for the Dancer web application require redirection to the login page; while this is normal for interactive use, it is not optimal for a quiet web service.

Is there an auth solution that will allow something like api keys?

+5
source share
1 answer

You have to look Dancer :: Plugin :: Auth :: Extensible to build this. The easiest way to submit credentials in each request. On the client, you call your REST service as follows:

$ua->post('http://example.com/rest/getStuff?cred=foobar1234567, $search_criteria);

If you do so, you can provide a cookie, but you do not need it, and the client will not necessarily have to take care of the cookie.

Edit: if you want basic authentication, see Plack :: Builder . You can use it to add authorization to certain requests.

+2
source

All Articles