Add an e-mail address for use in your Yivi app.
The easiest way to run the irma_email_issuer for development purposes is via Docker.
Various configuration files, keys and settings need to be in place to be able to build and run the apps.
- To generate the required keys for the issuer, run:
$ utils/keygen.sh ./src/main/resources/sk ./src/main/resources/pk
- Create the Java app configuration:
Copy the file
src/main/resources/config.sample.json
tosrc/main/resources/config.json
.
For Redis the following environment variables need to be set:
Name | Description |
---|---|
REDIS_HOST | Host to reach the redis at |
REDIS_PORT | Port to reach the redis at |
REDIS_MASTER_NAME | The master name for the Redis Sentinel |
REDIS_USERNAME | Username for the Redis user |
REDIS_PASSWORD | The password for the Redis user |
REDIS_KEY_PREFIX | The prefix to use for all redis keys |
STORAGE_TYPE | The type of storage used: if you want to enable Redis, set it to "redis" |
Use docker-compose up combined with your localhost IP address as environment variable to spin up the containers:
$ IP=192.168.1.105 docker-compose up
Note: do not use 127.0.0.1
or 0.0.0.0
as IP addresses as this will result in the app not being able to find the issuer.
By default, docker-compose caches docker images, so on a second run the previous built images will be used. A fresh build can be enforced using the --build flag.
$ IP=192.168.1.105 docker-compose up --build
The configuration should be mounted in the /config
directory of the container. The docker-compose.yml
file already contains this configuration.
The Java api and JavaScript frontend can be built and run manually using the following commands:
- Generate JWT keys for the issuer
$ utils/keygen.sh ./src/main/resources/sk ./src/main/resources/pk
-
Copy the file
src/main/resources/config.sample.json
tosrc/main/resources/config.json
and modify it. -
Build the webapp:
$ cd webapp && yarn install && yarn build en && cd ../
If you want to build another language, for example Dutch, change build en
to build nl
.
-
Copy the file
webapp/config.example.js
towebapp/build/assets/config.js
and modify it -
Run the following command in the root directory of this project:
$ gradle appRun
To open the webapp navigate to http://localhost:8080. The API is accessible via http://localhost:8080/irma_email_issuer/api
You can run the tests, defined in src/test/java/foundation/privacybydesign/email
, using the following command:
$ gradle test