Module: ModCloth::OpenID
- Includes:
- OpenIdAuthentication
- Defined in:
- lib/mc-openid.rb,
lib/mc-openid/version.rb
Constant Summary collapse
- VERSION =
"0.0.4"
Constants included from OpenIdAuthentication
OpenIdAuthentication::OPEN_ID_AUTHENTICATION_DIR
Instance Method Summary collapse
Methods included from OpenIdAuthentication
normalize_url, #store, store, store=
Instance Method Details
#check_openid(routes) ⇒ Object
9 10 11 |
# File 'lib/mc-openid.rb', line 9 def check_openid(routes) open_id_authentication("https://www.google.com/accounts/o8/site-xrds?hd=modcloth.com", routes) end |
#open_id_authentication(openid_url, routes) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/mc-openid.rb', line 13 def open_id_authentication(openid_url, routes) authenticate_with_open_id(openid_url, [{:name => :email, :uri => 'http://axschema.org/contact/email'}]) do |result, identity_url, registration| if result.successful? session[:user_email] = registration.data['http://axschema.org/contact/email'].first redirect_to routes[:success] else redirect_to routes[:fail] end end end |