agrafix / Spock

Another Haskell web framework for rapid development
https://www.spock.li
679 stars 56 forks source link

Token Based Authentication #47

Closed qmmdb closed 9 years ago

qmmdb commented 9 years ago

Have you considered adding token based authentication?

agrafix commented 9 years ago

Yes, that is certainly a good addition! But it will not land in the Spock package, but rather in a separate package (maybe it fits into the users package?). What exact type of token based auth did you have in mind? API-Keys? Cookie-Tokens? OAuth?

qmmdb commented 9 years ago

I'm leaning toward OAuth with tokens formatted in JWT.

agrafix commented 9 years ago

Yes, that should be a perfect case for an independent package building on Spock, as I do not see where it actually needs the Spock internals. There's a JWT library for haskell (https://github.com/frasertweedale/hs-jose), so it should be quick to implement. Do you want to give it a shot? :-)

qmmdb commented 9 years ago
  1. I've never had to deal with this before until this week.
  2. I'm reading all I can about the OAuth.
  3. I really don't know if I'm the person to do this.

Not to kill any conversation, but since I opened this in the wrong repo, I'll close it now.

qmmdb commented 9 years ago

BTW, thanks for all of your work. This is an amazing project that has me excited about web development in Haskell again :)

agrafix commented 9 years ago

Happy to hear that! :-) I can't promise anything because I am very busy atm, but I'll look into OAuth & co when I find time. Let me know if you have any other ideas for Spock, find a bug or a bad documented feature!

qmmdb commented 9 years ago

https://github.com/anchor/oauth2-server seems relevant