Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@openpass/openpass-js-sdk

Package Overview
Dependencies
Maintainers
0
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@openpass/openpass-js-sdk

OpenPass SSO JavaScript SDK

  • 4.5.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
159
increased by47.22%
Maintainers
0
Weekly downloads
 
Created
Source

OpenPass JavaScript SDK

License Build Status

The OpenPass JavaScript SDK makes it easy to integrate OpenPass directly on your website.

Getting Started

To get started using the OpenPass JavaScript Sdk, see the JavaScript SDK Guide.

Pact Contract Testing

This project uses the Pact Contract Testing library to ensure compatibility with the OpenPass API. See https://docs.pact.io/ for more details.

The Pact Broker has been deployed to allow communication between the SDK and API and also to provide a web UI for viewing the contracts published so far as well as the verification results. The following two URLs are available:

Credentials are also required - currently we only have a single user with username / password credentials. These can be found in 1Password under Engineering with item name "OpenPass Pact Broker - Write User".

Contracts are published for each release of the SDK - this is managed automatically through GitHub Actions. The API is then tested against the contracts for each release - should you require testing against a release to stop due to the release no longer being supported, use the following command while connected to a Trade Desk VPN (replacing 1.0.0 with the appropriate version; you will also need to set PACT_BROKER_USERNAME and PACT_BROKER_PASSWORD):

$ npx pact-broker record-support-ended --pacticipant openpass-js-sdk --version 1.0.0 --environment production --broker-base-url=https://pact.internal.myopenpass.com -u=$PACT_BROKER_USERNAME -p=$PACT_BROKER_PASSWORD"

Writing contract tests

Note that MatchersV3 is imported from ./utils rather than from the Pact library as it provides a safe wrapper over the regex Matcher (with the possibility to also modify other matchers).

It is important to avoid random data in Pact contract tests, as well as other data that changes with each contract (such as SDK version numbers). This is because Pact can figure out when two SDK versions have identical contracts, allowing testing to only be done once - but using random data will result in the contracts for each SDK version being different, resulting in testing taking much longer than necessary.

Contribute

Keywords

FAQs

Package last updated on 25 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc