Permalink
Browse files

Fix omniauth configuration.

  • Loading branch information...
1 parent 7fe96a4 commit bfa6019a189d2b95254beee396670246706db89f @therabidbanana committed Apr 18, 2011
Showing with 8 additions and 3 deletions.
  1. +2 −2 lib/orange-more.rb
  2. +6 −1 lib/orange-more/administration/middleware/access_control.rb
View
@@ -11,6 +11,6 @@
require File.join(libdir, 'orange-more', 'news')
require File.join(libdir, 'orange-more', 'disqus')
require File.join(libdir, 'orange-more', 'contactforms')
-require File.join(libdir, 'orange-more', 'analytics')
+# require File.join(libdir, 'orange-more', 'analytics')
require File.join(libdir, 'orange-more', 'cloud')
-require File.join(libdir, 'orange-more', 'debugger')
+require File.join(libdir, 'orange-more', 'debugger')
@@ -135,6 +135,11 @@ def handle(packet)
end
path = packet['route.path'] || packet.request.path
# If trying to login
+ if path.match(/\/auth\/([^\/]+)\/?/)
+ packet[:status] = 404
+ packet[:content] = "Not found"
+ packet.finish
+ end
if auth_match = path.match(/\/auth\/([^\/]+)\/callback/)
provider = packet['user.provider'] = auth_match[1]
packet.reroute('/') unless packet['omniauth.auth', false]
@@ -205,4 +210,4 @@ def handle(packet)
end
end # end handle_openid
end
-end
+end

0 comments on commit bfa6019

Please sign in to comment.