arrow-left

All pages
gitbookPowered by GitBook
1 of 2

Loading...

Loading...

Build

hashtag
Docker

To quickly start up the IDPKit using Docker, refer to:

Docker Container

Or continue on the next section, for building and running the IDP Kit on your local development environment.

hashtag
Local build

To build and run the IDP Kit on your local development environment, make sure to set up your machine with these requirements:

  • JDK 16+

  • NodeJS 18 with Yarn

hashtag
Project structure

The IDP Kit is structured into a backend (main) and frontend project.

hashtag
IDP Kit backend

The project is written in Kotlin and compiled for JVM 16+. The build project is set up using Gradle.

hashtag
IDP Kit frontend

The web UI, which provides the wallet connect and cross-device credential exchange web interfaces, is written in Nuxt.js and set up as a NodeJs/Yarn project.

hashtag
Backend build

To build the IDP Kit backend, use the gradle wrapper script, which automatically sets up a local installation of gradle and runs the build:

./gradlew build

Alternatively use the build and run functionality of your IDE. We use IntellJ IDEA to build, run and test the project.

hashtag
Frontend build

To build the frontend, navigate into its subfolder:

cd web/waltid-idpkit-ui

Install the required dependencies, using yarn:

yarn install

Run the dev server, if you're developing:

yarn dev

Or, generate the production build output:

yarn generate

hashtag
Development build configuration

To run the IDP Kit in a development environment, you need to start both the backend and the frontend services.

Check the following configuration and possibly adapt it to your needs:

hashtag
Nuxt config

File: web/waltid-idpkit-ui/nuxt.config.js:

Look for the proxy section near the end of the configuration file.

Make sure the host and port mapping of the API paths, corresponds to the host and port, on which the IDP Kit backend is running.

Typically this section will look like this:

Configure the port on which the frontend should be started, by using the server section like this:

hashtag
IDP config

File: config/idp-config.json:

Let the externalUrl point to an address on which the IDP Kit frontend service is running and reachable from a browser.

E.g.:

hashtag
Verifier config

File: config/verifier-config.json:

Set the verifierApiUrl to a URL on which the IDP Kit backend is listening, and that is reachable from a browser.

Set the url of the walt.id wallet configuration to the web wallet, which should be used. By default, this is pointing to the wallet deployed on walt-test.cloud.

e.g.:

   proxy: {
        '/verifier-api/': "http://localhost:8080/",
        '/api/': "http://localhost:8080/",
        '/webjars/': "http://localhost:8080/"
    }
    server: {
        port: 5000
    }
{
  "externalUrl": "http://localhost:5000",
}
{
  "verifierUiUrl": "",
  "verifierApiUrl": "http://localhost:8080/api/siop/default",

  "wallets": {
    "walt.id": {
      "id": "walt.id",
      "url": "https://wallet.walt-test.cloud",
      "presentPath": "api/siop/initiatePresentation/",
      "receivePath" : "api/siop/initiateIssuance/",
      "description": "localhost wallet"
    }
  }
}

Docker

hashtag
Run IDP Kit docker container

If you want to quickly try out the latest build of the IDP Kit and connect your web application to it, you can simply run the docker container and configure your application's OIDC client library to connect to it.

To understand the necessary configuration before running the service, consult the section IDP Kit setup and configuration.

Edit the configuration files in waltid-idpkit/config according to your needs and run the container like so:

Now you may open your browser on the exposed swagger documentation to browse and try out the REST APIs:

http://localhost:8080/api/swagger

... or configure your application to read the IDP settings from the well-known OpenID configuration endpoint:

http://localhost:8080/api/oidc/.well-known/openid-configuration

cd waltid-idpkit
docker run -p 8080:8080 -e WALTID_DATA_ROOT=/data -v $PWD:/data waltid/idpkit run