2010-10-18 14:58:45 -07:00
|
|
|
require 'openneo-auth'
|
|
|
|
|
|
|
|
Openneo::Auth.configure do |config|
|
2015-07-16 14:44:52 -07:00
|
|
|
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
|
2015-07-16 14:44:52 -07:00
|
|
|
|
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
|