Giter Club home page Giter Club logo

alphagov.passport-verify-stub-relying-party's Introduction

Passport-verify-stub-relying-party

Passport-verify-stub-relying-party is a Node.js application built to demonstrate how a government service connecting to GOV.UK Verify can build a Node.js service that uses the Verify Service Provider to communicate with the Verify Hub.

This application uses:

For more information about connecting to Verify, refer to:

Build status

Build Status

Pre-requisites

To use Passport-verify-stub-relying-party, you must have:

  • Node.js
  • Docker
  • Java11 JRE

You must also configure and deploy:

Installation

passport-verify-stub-relying-party uses yarn to manage dependencies. See the yarn documentation for more information.

Install the dependencies with:

yarn install

Note: There is a preinstall script that prevents npm install from being run. A consequnce of this is that yarn install cannot be chained with any other npm tasks, meaning yarn install cannot be incorporated into an npm script such as npm build or npm startup.

Start the application with defaults:

npm run startup

This will invoke the following default values for configuration:

  • ENTITY_ID: null
  • VERIFY_SERVICE_PROVIDER_HOST: http://localhost:50400
  • DATABASE_CONNECTION_STRING: postgesql://localhost:5432/stub_rp_test (intended for connecting to a local postgres docker container defined by db.Dockerfile

Testing

For the unit tests run:

npm run test

To run the full suite of tests, refer to the acceptance test documentation

To run the end-to-end tests using docker, first build a docker image:

docker build . -f ci/puppeteer.Dockerfile -t puppeteer

Then (while connected to the VPN) run something like:

docker run --network=host -v `pwd`:"/passport-verify-stub" -e "E2E_TEST_ENVIRONMENT=https://passport-verify-stub-relying-party-integration.cloudapps.digital" puppeteer /bin/sh -exc "cd passport-verify-stub; yarn install; yarn run e2e-tests:non-matching"

For valid combinations of environment URL and test suite (i.e. matching vs non-matching), see the VSP Concourse pipeline.

For development of passport-verify node module

If you want to run the service using a locally linked copy of 'passport-verify', be aware that TypeScript has a bug that duplicates dependencies. To get around this, remove the following dependencies.

rm -r node_modules/@types/passport-strategy/
rm -r node_modules/@types/passport/

alphagov.passport-verify-stub-relying-party's People

Contributors

richardtowers avatar tunylund avatar sgreensmith avatar jakubmiarka avatar rachaelbooth avatar adityapahuja avatar wynndow avatar jkunle avatar j-lambo avatar chrisholmes avatar galund avatar skeerthana avatar andy-paine avatar jhjava avatar alan-gds avatar kerrr avatar rosa-fox avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.