This module contains Typescript code for:
- Generating Certificates for MTLS and JWT Signing for OP PSD2 Sandbox environment and
- Registering to OP's PSD2 Sandbox and Production environments.
For information on the details, see the source code and the TPP setup page.
- Latest version of NodeJS
- Typescript
npm i -g typescript - tslint
npm i -g tslint - ts-node
npm i -g ts-node - conf/env.json pre-filled with your organization's data
- Api Key: Register an app on OP Developer and subscribe to one or more PSD2 sandbox APIs. Add your api key to env.json attribute
api_key.
Replace following values in the conf/env.json to match your organization (refer to https://op-developer.fi/p/psd2-tpp-setup#user-content-tpp-registration for attribute details):
countryredirect_uristpp_idapi_keypublic_jwks_urlssa.software_client_namessa.software_client_urissa.software_redirect_urisssa.org_namessa.org_contacts
This option will generate suitable certificates & private jwks (stored in conf/privatejwks.json) for you for sandbox demo use using sandbox entry in env.json as attribute source.
$ npm i
$ npm run register-tppUpon successful request, you will first receive sandbox jwks that is in turn utilized to send a signed registration request. Finally, response JSON as depicted in OP Developer documentation is returned.
Prerequisites:
- You have generated your own private JWKS and stored it as .json
- Your env.json contains attribute
public_jwks_urlwith a valid url to your public JWKS.
$ npm i
$ npm run register-tpp privateJwksPath=/path/to/privatejwks.jsonBy adding 'environment' command-line argument, you can explicitly define which enviroment in env.json is used:
$ npm i
$ npm run register-tpp environment=prodWithout explicitly defined enviroment argument, the program will default to 'sandbox'.
This project is licensed under the terms of the MIT license.