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.
source
share