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 }
|
2018-01-11 14:04:24 +01:00
|
|
|
.symbolize_keys
|
2018-01-15 12:07:54 +01:00
|
|
|
|
2018-01-11 14:04:24 +01:00
|
|
|
{ particulier: config_hash }
|
2017-02-21 17:05:51 +01:00
|
|
|
else
|
2018-01-11 14:04:24 +01:00
|
|
|
{
|
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',
|
|
|
|
}
|
2018-01-11 14:04:24 +01:00
|
|
|
}
|
2017-02-21 17:05:51 +01:00
|
|
|
end
|