15. I only need one User model.
Users will sign up and provide a password.
Only e-mail can validate users.
I only need one authentication method.
Iām only going to use Rails in my app.
I donāt have variable deploy targets.
I donāt want to customize much.
Wednesday, May 18, 2011
40. Requirements
ā¢ Social and traditional auth
ā¢ Strict e-mail veriļ¬cation
ā¢ Multiple e-mails, multiple authentications
per user
ā¢ Flexible enough to work with LDAP etc. for
behind-the-ļ¬rewall installs
ā¢ Automatic account creation based on
conļ¬rmed email domains
Wednesday, May 18, 2011
48. The Guts
ā¢ OmniAuth is just middleware
ā¢ Each provider is a strategy
ā¢ Each strategy is a class
ā¢ Each strategy has phases:
ā¢ Request Phase
ā¢ Callback Phase
Wednesday, May 18, 2011
51. Request Phase
/auth/:provider
ā¢ Requests information of the user
ā¢ For OAuth, redirects to provider
ā¢ For OpenID, requests URL
ā¢ For LDAP, requests user/pass
Wednesday, May 18, 2011
52. Callback Phase
/auth/:provider/callback
ā¢ Creates the user info hash
ā¢ For OAuth, grabs and uses access
token to fetch user info
ā¢ For OpenID, parses the response
ā¢ For LDAP, retrieves directory info
Wednesday, May 18, 2011
53. Enough talk.
Letās BUILD!
Wednesday, May 18, 2011
59. API Calls with remote site
interaction and credential
requirements.
To 40+ diļ¬erent sites.
Wednesday, May 18, 2011
60. I had to choose:
Test it all, or
release it ever.
Wednesday, May 18, 2011
61. Testing is
priority #1
going forward.
Wednesday, May 18, 2011
62. SUP DAWG I HEARD YOU LIKE TESTING GEMS
SO I MADE A GEM TO TEST YOUR GEM AND WROTE
TESTS FOR IT SO YOU CAN TEST MY GEM FOR
TESTING YOUR GEM WHILE YOU TEST YOUR GEM
Wednesday, May 18, 2011