summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPat Thoyts <patthoyts@users.sourceforge.net>2012-03-07 11:16:52 +0000
committerPat Thoyts <patthoyts@users.sourceforge.net>2012-03-23 15:35:55 +0000
commit6e27350aac1ed5616352af343bac2f8eefc7a840 (patch)
tree25878fd006c447966677b8004db83a1d20481462
parentfa8219e0a753e642a6f1dbdfc010d01ae8a949ee (diff)
downloadgitlab-ce-6e27350aac1ed5616352af343bac2f8eefc7a840.tar.gz
Move OmniAuth configuration details into a non-revision controlled file.
Provide an omniauth.rb.sample file to avoid encouraging end-users to commit their provider access details (passwords or api tokens) into their git repositories. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
-rw-r--r--.gitignore1
-rw-r--r--config/initializers/devise.rb15
-rw-r--r--config/initializers/omniauth.rb.sample15
3 files changed, 19 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore
index 596c0d6dbc0..a5ad41fb87e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,4 +16,5 @@ Vagrantfile
.vagrant
config/gitlab.yml
config/database.yml
+config/initializers/omniauth.rb
db/data.yml
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index ae378b73140..5b066edd47d 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -195,18 +195,9 @@ Devise.setup do |config|
config.sign_out_via = :delete
# ==> OmniAuth
- # Add a new OmniAuth provider. Check the wiki for more information on setting
- # up on your models and hooks.
- # config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
-
- #config.omniauth :ldap,
- # :host => 'YOUR_LDAP_SERVER',
- # :base => 'THE_BASE_WHERE_YOU_SEARCH_FOR_USERS',
- # :uid => 'sAMAccountName',
- # :port => 389,
- # :method => :plain,
- # :bind_dn => 'THE_FULL_DN_OF_THE_USER_YOU_WILL_BIND_WITH',
- # :password => 'THE_PASSWORD_OF_THE_BIND_USER'
+ # To configure a new OmniAuth provider copy and edit omniauth.rb.sample
+ # selecting the provider you require.
+ # Check the wiki for more information on setting up on your models
# ==> Warden configuration
# If you want to use other strategies, that are not supported by Devise, or
diff --git a/config/initializers/omniauth.rb.sample b/config/initializers/omniauth.rb.sample
new file mode 100644
index 00000000000..8728472f076
--- /dev/null
+++ b/config/initializers/omniauth.rb.sample
@@ -0,0 +1,15 @@
+# Copy this file to 'omniauth.rb' and configure it as necessary.
+# The wiki has further details on configuring each provider.
+
+Devise.setup do |config|
+ # config.omniauth :github 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
+
+ # config.omniauth :ldap,
+ # :host => 'YOUR_LDAP_SERVER',
+ # :base => 'THE_BASE_WHERE_YOU_SEARCH_FOR_USERS',
+ # :uid => 'sAMAccountName',
+ # :port => 389,
+ # :method => :plain,
+ # :bind_dn => 'THE_FULL_DN_OF_THE_USER_YOU_WILL_BIND_WITH',
+ # :password => 'THE_PASSWORD_OF_THE_BIND_USER'
+end \ No newline at end of file