2017-02-21 17:05:51 +01:00
|
|
|
FRANCE_CONNECT = if !Rails.env.test?
|
|
|
|
file_path = "#{Rails.root}/config/france_connect.yml"
|
2018-01-15 12:07:54 +01:00
|
|
|
config_hash = YAML.safe_load(File.read(file_path))
|
|
|
|
.reduce({}) { |acc, (key, value)| acc[key.gsub('particulier_', '')] = value, acc }
|
|
|
|
|
|
|
|
Hashie::Mash.new(particulier: config_hash)
|
2017-02-21 17:05:51 +01:00
|
|
|
else
|
|
|
|
Hashie::Mash.new({
|
2018-01-15 12:07:54 +01:00
|
|
|
particulier: {
|
|
|
|
identifier: 'plop',
|
|
|
|
secret: 'plip',
|
|
|
|
redirect_uri: 'https://bidon.com/endpoint',
|
|
|
|
authorization_endpoint: 'https://bidon.com/endpoint',
|
|
|
|
token_endpoint: 'https://bidon.com/endpoint',
|
|
|
|
userinfo_endpoint: 'https://bidon.com/endpoint',
|
|
|
|
logout_endpoint: 'https://bidon.com/endpoint',
|
|
|
|
}
|
2017-02-21 17:05:51 +01:00
|
|
|
})
|
|
|
|
end
|