From: Tom Hughes Date: Tue, 14 Apr 2015 18:03:46 +0000 (+0100) Subject: Configure Google OAuth support` X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/628e99e76f4f27bcb06684de9650b55267c95d69 Configure Google OAuth support` --- diff --git a/cookbooks/web/definitions/rails_port.rb b/cookbooks/web/definitions/rails_port.rb index 616f4dd18..cfa78a275 100644 --- a/cookbooks/web/definitions/rails_port.rb +++ b/cookbooks/web/definitions/rails_port.rb @@ -204,6 +204,12 @@ define :rails_port, :action => [:create, :enable] do 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") diff --git a/cookbooks/web/recipes/rails.rb b/cookbooks/web/recipes/rails.rb index 98b515d42..9b0c54974 100644 --- a/cookbooks/web/recipes/rails.rb +++ b/cookbooks/web/recipes/rails.rb @@ -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 + 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"