Skip to main content

web-api-auth

Contains methods for accessing the Catalogue Auth API. If you can we suggest you make use of it when accessing the Catalogue Auth API.

tip

If you are using Public AccessTokens you will not need the web-api-auth.

The package is implemented as a Node-dependent server module. It will not, and should not, work directly in the browser, as the Private AccessToken should never leave your backend servers.

If your server environment does not run Node it should be fairly uncomplicated to do calls to to the Catalogue Auth API without the help of the this package.

Example

const api = new CatalogueAuthAPI();

// ACCESS_TOKEN, stored in a secure way
api.auth = { endpoint, ACCESS_TOKEN };

api.postAuthorize({}).then((auth) => {
// ...the AuthorizeResponse, containing the SessionToken and an array with
// all Catalogues you now have access to. Forward this to whomever needs to
// make Catalogue API requests.
});