Skip to content

Latest commit

 

History

History
executable file
·
81 lines (59 loc) · 2.71 KB

File metadata and controls

executable file
·
81 lines (59 loc) · 2.71 KB

Connector

Introduction

Rails application, Priora Provider(Bank) facing API.

Quick setup

1. Registration & API Keys

Follow the guide on how to register and add API keys

2. Navigate to project's root folder
cd ruby-connector-sample
3. Create configuration files
cp config/application.example.yml config/application.yml
cp config/database.example.yml config/database.yml
4. Edit configuration files

You can generate your RSA key pair using this commands:

openssl genrsa -out test_private.pem 2048
openssl rsa -pubout -in test_private.pem -out test_public.pem

Notice that you must save the content of test_public.pem in your Provider Dashboard in Settings compartment.

After following the step above, be sure to save your private key generated by openssl into a file named test_private.pem in demobank-connector/config folder. You may also change the filename setting in config/application.yml. Please notice that

defaults: &defaults
  application:
    ...
    private_key_path: 'test_private.pem'
5. Install Docker and Docker Compose

https://docs.docker.com/install/

6. Build docker container
docker-compose build
7. Launch docker container
docker-compose up

Optionally, you can open a tunnel via ngrok to expose your local address.

ngrok http 3000

Then copy the given address (something like https://15c77e87.ngrok.io) and set it as your connector's url in your provider dashboard.

Notice that the free version of ngrok provides a limited number of requests per minute. This can cause problems when fetching a bigger number of transactions

Testing and Code Analyzing

Connector project uses:

  • RSpec, the available test examples may be run with
docker-compose run app bundle exec rspec

Please note that tests will fail unless you configure the correct priora_public.pem. The current public_key is the one you can find in our documentation and it allows you to decode jwt tokens sent from Priora. In order to make test pass, you should replace the priora_public.pem value with the one found in spec/fixture/test_priora_public.pem

Documentation

You can find the full documentation of Connector at priora.saltedge.com/connector-docs.

License

Connector project is licensed under the MIT license. Copyright (c) 2019 Salt Edge Inc.