commit
358637adde
4 changed files with 10 additions and 17 deletions
|
@ -45,7 +45,7 @@ class ApiEntreprise::API
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.url(resource_name, siret_or_siren)
|
def self.url(resource_name, siret_or_siren)
|
||||||
[base_url, resource_name, siret_or_siren].join("/")
|
[API_ENTREPRISE_URL, resource_name, siret_or_siren].join("/")
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.params(siret_or_siren, procedure_id)
|
def self.params(siret_or_siren, procedure_id)
|
||||||
|
@ -62,8 +62,4 @@ class ApiEntreprise::API
|
||||||
def self.token
|
def self.token
|
||||||
Rails.application.secrets.api_entreprise[:key]
|
Rails.application.secrets.api_entreprise[:key]
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.base_url
|
|
||||||
Rails.application.secrets.api_entreprise[:base_url]
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,8 +6,7 @@ GITHUB_CLIENT_SECRET=""
|
||||||
|
|
||||||
FC_PARTICULIER_ID=""
|
FC_PARTICULIER_ID=""
|
||||||
FC_PARTICULIER_SECRET=""
|
FC_PARTICULIER_SECRET=""
|
||||||
FC_PARTICULIER_REDIRECT_URI=""
|
FC_PARTICULIER_BASE_URL=""
|
||||||
FC_PARTICULIER_HOST=""
|
|
||||||
|
|
||||||
API_ENTREPRISE_KEY=""
|
API_ENTREPRISE_KEY=""
|
||||||
API_ENTREPRISE_BASE_URL="https://entreprise.api.gouv.fr/v2"
|
API_ENTREPRISE_BASE_URL="https://entreprise.api.gouv.fr/v2"
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
|
# API URLs
|
||||||
API_CARTO_URL = "https://apicarto.sgmap.fr"
|
API_CARTO_URL = "https://apicarto.sgmap.fr"
|
||||||
|
API_ENTREPRISE_URL = "https://entreprise.api.gouv.fr/v2"
|
||||||
API_GEO_URL = "https://geo.api.gouv.fr"
|
API_GEO_URL = "https://geo.api.gouv.fr"
|
||||||
|
|
||||||
PIPEDRIVE_API_URL = 'https://api.pipedrive.com/v1'
|
PIPEDRIVE_API_URL = 'https://api.pipedrive.com/v1'
|
||||||
|
|
||||||
|
# External services URLs
|
||||||
DOC_URL = "https://doc.demarches-simplifiees.fr"
|
DOC_URL = "https://doc.demarches-simplifiees.fr"
|
||||||
LISTE_DES_DEMARCHES_URL = [DOC_URL, "listes-des-demarches"].join("/")
|
LISTE_DES_DEMARCHES_URL = [DOC_URL, "listes-des-demarches"].join("/")
|
||||||
CGU_URL = [DOC_URL, "cgu"].join("/")
|
CGU_URL = [DOC_URL, "cgu"].join("/")
|
||||||
MENTIONS_LEGALES_URL = [CGU_URL, "4-mentions-legales"].join("#")
|
MENTIONS_LEGALES_URL = [CGU_URL, "4-mentions-legales"].join("#")
|
||||||
|
|
||||||
FAQ_URL = "https://faq.demarches-simplifiees.fr"
|
FAQ_URL = "https://faq.demarches-simplifiees.fr"
|
||||||
|
|
|
@ -18,11 +18,11 @@ defaults: &defaults
|
||||||
france_connect_particulier:
|
france_connect_particulier:
|
||||||
identifier: <%= ENV['FC_PARTICULIER_ID'] %>
|
identifier: <%= ENV['FC_PARTICULIER_ID'] %>
|
||||||
secret: <%= ENV['FC_PARTICULIER_SECRET'] %>
|
secret: <%= ENV['FC_PARTICULIER_SECRET'] %>
|
||||||
redirect_uri: <%= ENV['FC_PARTICULIER_REDIRECT_URI'] %>
|
redirect_uri: https://{{ <%= ENV['APP_HOST'] %> }}/france_connect/particulier/callback
|
||||||
authorization_endpoint: <%= ENV['FC_PARTICULIER_HOST'] %>/api/v1/authorize
|
authorization_endpoint: <%= ENV['FC_PARTICULIER_BASE_URL'] %>/api/v1/authorize
|
||||||
token_endpoint: <%= ENV['FC_PARTICULIER_HOST'] %>/api/v1/token
|
token_endpoint: <%= ENV['FC_PARTICULIER_BASE_URL'] %>/api/v1/token
|
||||||
userinfo_endpoint: <%= ENV['FC_PARTICULIER_HOST'] %>/api/v1/userinfo
|
userinfo_endpoint: <%= ENV['FC_PARTICULIER_BASE_URL'] %>/api/v1/userinfo
|
||||||
logout_endpoint: <%= ENV['FC_PARTICULIER_HOST'] %>/api/v1/logout
|
logout_endpoint: <%= ENV['FC_PARTICULIER_BASE_URL'] %>/api/v1/logout
|
||||||
github:
|
github:
|
||||||
client_id: <%= ENV['GITHUB_CLIENT_ID'] %>
|
client_id: <%= ENV['GITHUB_CLIENT_ID'] %>
|
||||||
client_secret: <%= ENV['GITHUB_CLIENT_SECRET'] %>
|
client_secret: <%= ENV['GITHUB_CLIENT_SECRET'] %>
|
||||||
|
@ -31,7 +31,6 @@ defaults: &defaults
|
||||||
secret_key: <%= ENV['MAILJET_SECRET_KEY'] %>
|
secret_key: <%= ENV['MAILJET_SECRET_KEY'] %>
|
||||||
api_entreprise:
|
api_entreprise:
|
||||||
key: <%= ENV['API_ENTREPRISE_KEY'] %>
|
key: <%= ENV['API_ENTREPRISE_KEY'] %>
|
||||||
base_url: <%= ENV['API_ENTREPRISE_BASE_URL'] %>
|
|
||||||
pipedrive:
|
pipedrive:
|
||||||
key: <%= ENV['PIPEDRIVE_KEY'] %>
|
key: <%= ENV['PIPEDRIVE_KEY'] %>
|
||||||
fog:
|
fog:
|
||||||
|
@ -57,7 +56,6 @@ test:
|
||||||
signing_key: aef3153a9829fa4ba10acb02927ac855df6b92795b1ad265d654443c4b14a017
|
signing_key: aef3153a9829fa4ba10acb02927ac855df6b92795b1ad265d654443c4b14a017
|
||||||
api_entreprise:
|
api_entreprise:
|
||||||
key: api_entreprise_test_key
|
key: api_entreprise_test_key
|
||||||
base_url: https://entreprise.api.gouv.fr/v2
|
|
||||||
fog:
|
fog:
|
||||||
base_url: https://storage.apientreprise.fr
|
base_url: https://storage.apientreprise.fr
|
||||||
directory: tps_dev
|
directory: tps_dev
|
||||||
|
|
Loading…
Add table
Reference in a new issue