API used to create, update and search dossiers in vrijBRP. These API's are based on OpenAPI 3.0 standard.
Copyright © 2021 Procura BV.
Licensed under the EUPL
Committing this code to GitHub is a first step towards an open source BRP.
This application could have maven dependencies that might not be publicly available at this moment.
It also depends on several components that will become open source later.
- Java 11
- Maven 3
- Java Code formatting
- Eclipse code formatter (Intellij)
- Lombok plugin (optional)
mvn clean package
Create a run configuration to start nl.procura.burgerzaken.dossiers.DossiersApplication
- running vrijBRP Balie instance
Create an application.properties
file in the project root, e.g.:
server.port=8081
procura.gbasource.url=http://<server>:<port>/personen/rest
procura.gbasource.username=<vrijbrp-balie username>
procura.gbasource.password=<vrijbrp-balie password>
procura.personrecordsource.url=http://<server>:<port>/personen-ws/rest
procura.personrecordsource.username=<vrijbrp-balie-ws username>
procura.personrecordsource.password=<vrijbrp-balie-ws password>
# logging
logging.level.root=INFO
'personen' is a module in project 'vrijbrp-balie'
- Create database
dossiers
Run InitClient class with 4 parameters:
- id: unique ID to be used in token request
- scope: API scope, possible values: api, admin
- customer: customer description
- application: application description
InitClient returns a secret.
A detailed description of the authentication flow can be found in application/src/main/resources/static/public/authentication.pdf
.
In short, execute the following request with the basic authentication of id
and secret
:
POST /oauth/token HTTP/1.1
Host: localhost
Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials&scope=api
The resulting access token can be used as Bearer token in following requests.
A docker image will become available publically in the near future.