]> git.openstreetmap.org Git - chef.git/commitdiff
Configure Google OAuth support`
authorTom Hughes <tom@compton.nu>
Tue, 14 Apr 2015 18:03:46 +0000 (19:03 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 14 Apr 2015 18:03:46 +0000 (19:03 +0100)
cookbooks/web/definitions/rails_port.rb
cookbooks/web/recipes/rails.rb

index 616f4dd18d0630ebfe39b164ff507ad1200accf5..cfa78a275dc19e3ac83083fc3617187ead7c0a02 100644 (file)
@@ -204,6 +204,12 @@ define :rails_port, :action => [:create, :enable] do
       line.gsub!(/^( *)nominatim_url:.*$/, "\\1nominatim_url: \"#{params[:nominatim_url]}\"")
     end
 
       line.gsub!(/^( *)nominatim_url:.*$/, "\\1nominatim_url: \"#{params[:nominatim_url]}\"")
     end
 
+    if params[:google_auth_id]
+      line.gsub!(/^( *)#google_auth_id:.*$/, "\\1google_auth_id: \"#{params[:google_auth_id]}\"")
+      line.gsub!(/^( *)#google_auth_secret:.*$/, "\\1google_auth_secret: \"#{params[:google_auth_secret]}\"")
+      line.gsub!(/^( *)#google_openid_realm:.*$/, "\\1google_openid_realm: \"#{params[:google_openid_realm]}\"")
+    end
+
     line.gsub!(/^( *)require_terms_seen:.*$/, "\\1require_terms_seen: true")
     line.gsub!(/^( *)require_terms_agreed:.*$/, "\\1require_terms_agreed: true")
 
     line.gsub!(/^( *)require_terms_seen:.*$/, "\\1require_terms_seen: true")
     line.gsub!(/^( *)require_terms_agreed:.*$/, "\\1require_terms_agreed: true")
 
index 98b515d428c24a2abb6916528eef0b450d2ef5a3..9b0c54974b8f358f1c4246daed678632f3de53bb 100644 (file)
@@ -65,6 +65,9 @@ rails_port "www.openstreetmap.org" do
   id_key web_passwords["id_key"]
   oauth_key web_passwords["oauth_key"]
   piwik_configuration piwik_configuration
   id_key web_passwords["id_key"]
   oauth_key web_passwords["oauth_key"]
   piwik_configuration piwik_configuration
+  google_auth_id "651529786092-6c5ahcu0tpp95emiec8uibg11asmk34t.apps.googleusercontent.com"
+  google_auth_secret web_passwords["google_auth_secret"]
+  google_openid_realm "https://www.openstreetmap.org"
 end
 
 gem_package "apachelogregex"
 end
 
 gem_package "apachelogregex"