OAuth providers

141 views
Skip to first unread message

Sujal Shah

unread,
Dec 10, 2011, 12:04:26 PM12/10/11
to golia...@googlegroups.com
Hi folks,

Has anyone written or found a gem or library that integrates with Goliath to protect APIs with OAuth or OAuth2? 

I'm about to tear apart @assaf's rack-oauth2-server to make it fully async (probably Goliath only - not sure) otherwise, but am doing a last sanity check in case I missed something out there in my google searching.

Thanks,

Sujal

Joshua Warchol

unread,
Dec 10, 2011, 12:50:02 PM12/10/11
to golia...@googlegroups.com
I need this too. If you do tear at it, let's collab.

Sent from my iPhone

Adam Watson

unread,
Dec 10, 2011, 12:54:23 PM12/10/11
to golia...@googlegroups.com
I did some research a few weeks ago, and I did not find any other projects that provide Oauth/2 support in an async-middleware way. I was also looking at rack-oauth2-server as a possible starting point for porting to Goliath. Keep me posted so I can follow your repo and collaborate.

Cheers,
Adam

Sujal Shah

unread,
Dec 10, 2011, 1:23:36 PM12/10/11
to golia...@googlegroups.com
Josh, Adam, 

Will do. 

Based on a quick read through rack-oauth2-server (ro2s from here on out), I think I have to rip it apart and make a Goliath or EM-friendly filter, since it includes mongo calls and models inside the filter.

Is there an automagical replacement for mongo calls that I'm not thinking about (basically a monkey patch that exists)?

All the calls in the model object are on the mongo gem's connection object and follow this basic pattern:

conn = Mongo::Connection.new["my_db"]
conn["oauth2.access_grants"].<insert | update | find_one>

I need to get up to speed on EM::Mongo and the synchrony patches anyway to fix the connection pool limitation in Goliath anyway, so I guess that'll be my first stop if there isn't an easy answer to this.

Sujal

Ilya Grigorik

unread,
Dec 10, 2011, 6:26:35 PM12/10/11
to golia...@googlegroups.com
Connection pool for EM::Mongo should work just fine - we've been using it in production for a very long time now.

(and under heavy load)

ig

Sujal Shah

unread,
Dec 11, 2011, 11:42:36 AM12/11/11
to golia...@googlegroups.com
Poor phrasing on my part - I meant em-mongo, goliath, and Mongoid - with Mongoid, it seems like it's only using one connection ever.

Sujal
Reply all
Reply to author
Forward
0 new messages