browserid/mozilla persona support?

22 views
Skip to first unread message

gi...@lewman.us

unread,
Oct 10, 2012, 11:37:39 PM10/10/12
to gitit-...@googlegroups.com
I've failed to hack in mozilla browserid/persona support to
gitit. I thought I could simply follow along the rpxnow code, but
well, I'm still learning haskell and probably screwed it up. It seems that
http://hackage.haskell.org/packages/archive/authenticate/1.3.1/doc/html/src/Web-Authenticate-BrowserId.html
and http://www.yesodweb.com/blog/2011/07/browserid-support are both
possibilities for me to continue hacking.

Before I fall into the blackhole, has anyone else already done this
to gitit?

Thanks!

--
Andrew
pgp 0x6B4D6475

Clint Adams

unread,
Oct 11, 2012, 10:00:47 AM10/11/12
to gitit-...@googlegroups.com
Hi Andrew,

On Thu, Oct 11, 2012 at 03:37:39AM +0000, gi...@lewman.us wrote:
> I've failed to hack in mozilla browserid/persona support to
> gitit. I thought I could simply follow along the rpxnow code, but
> well, I'm still learning haskell and probably screwed it up. It seems that
> http://hackage.haskell.org/packages/archive/authenticate/1.3.1/doc/html/src/Web-Authenticate-BrowserId.html
> and http://www.yesodweb.com/blog/2011/07/browserid-support are both
> possibilities for me to continue hacking.

I don't know anything about Happstack, but it may be easier to
hack on gitit2[0], wherein I think you would add something like
(untested)

instance YesodAuth Gitit where
type AuthId Gitit = GititUser

loginDest _ = HomeR
logoutDest _ = HomeR

getAuthId creds = GititUser (credsIdent creds) (credsIdent creds)

authPlugins _ = [authBrowserId]

authHttpManager = httpManager

and then add an AuthR route and do something about requireUser.

[0] https://github.com/jgm/gitit2
Reply all
Reply to author
Forward
0 new messages