@@ -52,6 +52,49 @@ Once successfull you can launch your local cozy with following url: [Cozy local
Local database can also be consulted at the following url: [Cozy local DB](http://localhost:5984/_utils/)
## Use local konnectors
In most case you will use mocked konnectors with mock data, but for some testing goals you will need real accounts.
In local, it is possible to run EGL en SGE-Enedis konnectors, with real accounts, but it needs somme specific manipulation as well as you'll need to use api secrets that are, of course, basically not available in the project. If you need to use konnectors with real accounts in testing goals, please follow the following steps. Otherwise, refer to the next two sections 'Import Mock Data' et 'Simulate konnector connexions'.
First step, make sure your stack is running. Then open your [couchDB](http://localhost:5984/_utils/) and look for the ```secrets/io-cozy-account_types``` entry.
Then add a new document like this :
EGL Example
```
{
"_id": "eglgrandlyon",
"grant_mode": "secret",
"slug": "eglgrandlyon",
"secret": {
"eglBaseURL": "******",
"eglAPIAuthKey": "*****"
}
}
```
SGE Enedis example
```
{
"_id": "enedis-sge-grandlyon",
"grant_mode": "secret",
"slug": "enedis-sge-grandlyon",
"secret": {
"loginUtilisateur": "******",
"wso2BaseUrl": "*****",
"contractId": "*****",
"apiToken": "*****"
}
}
```
!!! info ""
You'll need to use konnector slug as is to make it work properly
You can contact an administrator in order to get the proper informations to fill in your secret.
Once it is done, you will be able to use these 2 Konnectors with real accounts.
!!! warning "You might see this message before trying to log with SGE Account"
Make sure you have the people's consent to use his PDL number, as well as it is a sensitive data.
## Import mock data
!!! info "Requirement"
...
...
@@ -108,7 +151,7 @@ Finally your data is loaded in the Ecolyo Application !
!!! info "Requirement"
Your dev stack should be running to import data needed to simulate konnectors connection
When using local environment, konnectors are not able to connect.
When using local environment, konnectors are not able to connect as in production.
To simulate the connection you can use the script **createConnection.js** available in **scripts** folder.
First update the authorization and cookie information from the "config.js" file (if not created just create it from the "config.template.js" file):