enable openids in development by default, do not show openID header unless keys are set.

This commit is contained in:
Stella Rouzi 2014-07-30 17:18:58 +03:00
parent 4955b2b7b8
commit a8379081b4
2 changed files with 29 additions and 17 deletions

View file

@ -68,17 +68,17 @@ Osem::Application.configure do
} }
) )
OmniAuth.config.mock_auth[:novell] = OmniAuth.config.mock_auth[:suse] =
OmniAuth::AuthHash.new( OmniAuth::AuthHash.new(
provider: 'novell', provider: 'suse',
uid: 'novell-test-uid-1', uid: 'suse-test-uid-1',
info: { info: {
name: 'another user', name: 'another user',
email: 'user1@email.com' email: 'user1@email.com'
}, },
credentials: { credentials: {
token: 'novell_mock_token', token: 'suse_mock_token',
secret: 'novell_mock_secret' secret: 'suse_mock_secret'
} }
) )

View file

@ -10,6 +10,23 @@ defaults: &defaults
# Your errbit API key # Your errbit API key
# errbit_key: '12345' # errbit_key: '12345'
development:
<<: *defaults
# Sample data so that mocks work
google_key: 'sample'
google_secret: 'sample'
facebook_key: 'sample'
facebook_secret: 'sample'
suse_key: 'sample'
suse_secret: 'sample'
test:
<<: *defaults
production:
<<: *defaults
# Leave the variables' names empty, unless you use the providers, in which case you need to # Leave the variables' names empty, unless you use the providers, in which case you need to
# register your applicaton and add the actual keys. # register your applicaton and add the actual keys.
@ -24,17 +41,12 @@ defaults: &defaults
facebook_secret: '' facebook_secret: ''
# Developers do not need to register their application for suse account to work. # Developers do not need to register their application for suse account to work.
# You must, however, leave the sample data there, for the login option to appear. # You must, however, add some sample value to the variables, for the login option to appear.
suse_key: 'sample data' # For example:
suse_secret: 'sample data' #suse_key: 'sample data'
#suse_secret: 'sample data'
suse_key: ''
suse_secret: ''
# If you add more providers that do not require a key, you still have to create the 2 variables with sample data # If you add more providers that do not require a key, you still have to create the 2 variables with sample data
development:
<<: *defaults
test:
<<: *defaults
production:
<<: *defaults