impress/config/initializers/openneo_auth.rb

16 lines
397 B
Ruby
Raw Normal View History

2010-10-18 14:58:45 -07:00
require 'openneo-auth'
Openneo::Auth.configure do |config|
config.app = ENV.fetch('OPENNEO_AUTH_APP')
config.auth_server = ENV.fetch('OPENNEO_AUTH_SERVER')
config.secret = ENV.fetch('OPENNEO_AUTH_SECRET')
2010-11-13 16:42:56 -08:00
config.remote_auth_user_finder do |user_data|
2010-10-18 14:58:45 -07:00
User.find_or_create_from_remote_auth_data(user_data)
end
2010-11-13 16:42:56 -08:00
config.remember_user_finder do |id|
User.find_by_id(id)
end
2010-10-18 14:58:45 -07:00
end