2.2.0 • Published 3 years ago

@safeguard-apis/sg-validator-express v2.2.0

Weekly downloads
505
License
ISC
Repository
github
Last release
3 years ago

SafeGuard Device Auth Signature Validator Express

SafeGuard Validator Express Middleware

Installation

Using npm:

$ npm install --save @safeguard-apis/sg-validator
$ npm install --save @safeguard-apis/sg-validator-express

or using yarn:

$ yarn add @safeguard-apis/sg-validator
$ yarn add @safeguard-apis/sg-validator-express

Usage

import { SafeGuardValidator } from "@safeguard-apis/sg-validator";

const signedRequestParams = {
  httpVerb: "HTTP_VERB",
  domain: "DOMAIN"
};

const safeGuardValidator = new SafeGuardValidator(SAFEGUARD_API_KEY);
const response = this.safeGuardValidator.signature.validate(signedRequestParams, SG_SIGNATURE);
/* true */

Contributing

Setup development environment

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Install npm dependencies

$ docker-compose run --rm --no-deps app yarn

Now your local machine is ready for development and testing.

Running the tests

$ docker-compose run --rm --no-deps app yarn test

Deployment

Pushes a commit to master and generate a Release 1.2.3, the npm-publish action will publish the package to the npm registry.

2.2.0

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.6

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago