]> git.openstreetmap.org Git - rails.git/blobdiff - config/routes.rb
Remove save user step when configuring permissions
[rails.git] / config / routes.rb
index 5b537ea3e02ae0e4186fbcc38bf75d8ed716c380..43c43a793461242e12541da86ce4531ae43fd7c0 100644 (file)
@@ -1,11 +1,12 @@
 OpenStreetMap::Application.routes.draw do
 OpenStreetMap::Application.routes.draw do
-  use_doorkeeper_openid_connect
   use_doorkeeper :scope => "oauth2" do
     controllers :authorizations => "oauth2_authorizations",
                 :applications => "oauth2_applications",
                 :authorized_applications => "oauth2_authorized_applications"
   end
 
   use_doorkeeper :scope => "oauth2" do
     controllers :authorizations => "oauth2_authorizations",
                 :applications => "oauth2_applications",
                 :authorized_applications => "oauth2_authorized_applications"
   end
 
+  use_doorkeeper_openid_connect :scope => "oauth2" if Settings.key?(:doorkeeper_signing_key)
+
   # API
   namespace :api do
     get "capabilities" => "capabilities#show" # Deprecated, remove when 0.6 support is removed
   # API
   namespace :api do
     get "capabilities" => "capabilities#show" # Deprecated, remove when 0.6 support is removed