Commit 6e27350aac1ed5616352af343bac2f8eefc7a840

Authored by Pat Thoyts
1 parent fa8219e0

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>
@@ -16,4 +16,5 @@ Vagrantfile @@ -16,4 +16,5 @@ Vagrantfile
16 .vagrant 16 .vagrant
17 config/gitlab.yml 17 config/gitlab.yml
18 config/database.yml 18 config/database.yml
  19 +config/initializers/omniauth.rb
19 db/data.yml 20 db/data.yml
config/initializers/devise.rb
@@ -195,18 +195,9 @@ Devise.setup do |config| @@ -195,18 +195,9 @@ Devise.setup do |config|
195 config.sign_out_via = :delete 195 config.sign_out_via = :delete
196 196
197 # ==> OmniAuth 197 # ==> OmniAuth
198 - # Add a new OmniAuth provider. Check the wiki for more information on setting  
199 - # up on your models and hooks.  
200 - # config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'  
201 -  
202 - #config.omniauth :ldap,  
203 - # :host => 'YOUR_LDAP_SERVER',  
204 - # :base => 'THE_BASE_WHERE_YOU_SEARCH_FOR_USERS',  
205 - # :uid => 'sAMAccountName',  
206 - # :port => 389,  
207 - # :method => :plain,  
208 - # :bind_dn => 'THE_FULL_DN_OF_THE_USER_YOU_WILL_BIND_WITH',  
209 - # :password => 'THE_PASSWORD_OF_THE_BIND_USER' 198 + # To configure a new OmniAuth provider copy and edit omniauth.rb.sample
  199 + # selecting the provider you require.
  200 + # Check the wiki for more information on setting up on your models
210 201
211 # ==> Warden configuration 202 # ==> Warden configuration
212 # If you want to use other strategies, that are not supported by Devise, or 203 # If you want to use other strategies, that are not supported by Devise, or
config/initializers/omniauth.rb.sample 0 → 100644
@@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
  1 +# Copy this file to 'omniauth.rb' and configure it as necessary.
  2 +# The wiki has further details on configuring each provider.
  3 +
  4 +Devise.setup do |config|
  5 + # config.omniauth :github 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
  6 +
  7 + # config.omniauth :ldap,
  8 + # :host => 'YOUR_LDAP_SERVER',
  9 + # :base => 'THE_BASE_WHERE_YOU_SEARCH_FOR_USERS',
  10 + # :uid => 'sAMAccountName',
  11 + # :port => 389,
  12 + # :method => :plain,
  13 + # :bind_dn => 'THE_FULL_DN_OF_THE_USER_YOU_WILL_BIND_WITH',
  14 + # :password => 'THE_PASSWORD_OF_THE_BIND_USER'
  15 +end
0 \ No newline at end of file 16 \ No newline at end of file