[Haskell-cafe] Authenticated APIs in Servant
eraker at gmail.com
Mon Mar 13 02:18:22 UTC 2017
I don't know if this will be useful to you (and it may be poorly done), but
I've been slowly cobbling together my personal profile site using servant
and elm for the frontend, just for fun.
I have an admin/cms-type thing I've been doing a hack job of building (I
often get distracted by other projects).
Anyway, here's the login for it, which sets an auth cookie (and relies on
the *users* library) and uses a form:
Here are the actual auth-protected APIs:
I'm not sure if it'll help much, but there it is.
On Mar 12, 2017 5:42 PM, "Ivan Lazar Miljenovic" <ivan.miljenovic at gmail.com>
On 13 March 2017 at 11:30, Simon Hafner <hafnersimon at gmail.com> wrote:
> I have a bunch of changes based on hoauth2 lying around, and some
> connector code to servant. It will need some cleaning up before I can
> release it. I'll have a go at it tomorrow.
> 2017-03-13 1:20 GMT+01:00 Ivan Lazar Miljenovic <ivan.miljenovic at gmail.com
>> I'm needing to write and deploy a web API with authenticated
>> endpoints. I was planning on using Servant, but it looks like there
>> is still no in-built support for OAuth-style token-based APIs. Is
>> that correct, or did I miss something?
>> (That said, the actual API is of a "submit one POST and get a response
>> back" style rather than continuing to do more requests, so a
>> username/password basic authentication approach may also work if all
>> else fails.)
>> Ivan Lazar Miljenovic
>> Ivan.Miljenovic at gmail.com
>> Haskell-Cafe mailing list
>> To (un)subscribe, modify options or view archives go to:
>> Only members subscribed via the mailman list are allowed to post.
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> Only members subscribed via the mailman list are allowed to post.
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe