1.0.0 • Published 7 years ago

@apimarket/apimarket-server v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

About

This repository contains a library for interacting with the Aikon marketplace.

It wraps the Open Rights Exchange protocol to simplify the buying and selling of APIs in the marketplace.

Usage

Server

There are 2 ways to use this library. Both of the methods require verifier public key in the following format in the env file

VERIFIER_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----\nMFkw....==\n-----END PUBLIC KEY-----"

As an express middleware

With the verifier public key in the env file, supply an Express-style HTTP handler that services your API. Only valid requests will be served

const { apiMarketRequestValidator } = require('@apimarket/apimarket-server')

app.use(apiMarketRequestValidator())

As a javascript function from the library

With the verifier public key in the env file, use the checkOreAccessToken function of the library

const { apiMarketRequestValidator } = require('@apimarket/apimarket-server')

const isValidOreAcessToken = await checkOreAccessToken(req.headers['ore-access-token'], req)

Publish NPM Package

  • Update version number in package.json
  • npm publish --tag staging - to publish staging version
  • npm publish - to publish the production version

package name will be: @apimarket/apimarket-server@{version}

1.0.0

7 years ago

0.7.12

7 years ago

0.7.11

7 years ago

0.7.10

7 years ago

0.7.8

7 years ago

0.7.7

7 years ago

0.7.6

7 years ago

0.7.5

7 years ago

0.7.4

7 years ago

0.7.3

7 years ago

0.7.2

7 years ago

0.7.0

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago