Registry / security / bimedia-rest-security

bimedia-rest-security

JSON →
library2.1.0jsnpmunverified

Provides client authentication for Bimedia REST services using the Architect plugin system. Current stable version is 2.1.0. It validates timestamps and signatures via a private key server, with configurable scheme (default BWS), header prefix, and timestamp validity. Supports both issuer and principal-based authentication. Release cadence is not documented; the package is narrowly scoped to the Bimedia ecosystem and has low community adoption.

npm install bimedia-rest-security
INSTALL
IMPORT
SIG · BIMEDIA-REST-SECUR
B
bimedia-rest-security
securityjavascriptv2.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

rest-security
const config = { packagePath: 'bimedia-rest-security', ... };
const restSecurity = require('bimedia-rest-security');
This package is not a direct require; it's loaded by Architect as a plugin with a config object.
architect
const architect = require('architect');
import architect from 'architect';
architect is CommonJS and not ESM-compatible.
config.js
module.exports = [{ packagePath: 'bimedia-rest-security', ... }];
export default [{ packagePath: 'bimedia-rest-security', ... }];
Architect config uses CommonJS exports, not ESM.

Configures and starts an Architect application with the bimedia-rest-security plugin, using a private key server and default settings.

// config.js module.exports = [{ packagePath: 'bimedia-rest-security', keypath: 'http://localhost:8086/api/key/%s', timestampValidity: 900, scheme: 'BWS', name: 'auth', httpHeaderPrefix: 'x-bm' }]; // app.js var path = require('path'); var architect = require('architect'); var config = architect.loadConfig(path.join(__dirname, 'config.js')); architect.createApp(config, function (err, app) { if (err) { throw err; } console.log('app ready'); });
Debug
Known issues
gotchaThe keypath is a URL template where %s is replaced with the principal. Ensure the principal is URL-encoded if it contains special characters.
fix
Use encodeURIComponent on the principal before passing it to the plugin.
affects: >=2.0.0
gotchaThe package is not published on npm; install directly from GitHub. This may cause versioning issues or unavailability.
fix
Consider using an npm registry mirror or vendor the dependency.
affects: all
deprecatedThe package relies on the deprecated 'architect' plugin system which is no longer maintained.
fix
Migrate to a different authentication solution that does not require architect.
affects: all
Errors
Common errors & fixes
Error: Cannot find module 'architect'
architect is a peer dependency but not installed.
fix
npm install architect --save
TypeError: Cannot read properties of undefined (reading 'keypath')
Configuration object missing keypath or packagePath property.
fix
Ensure config.js exports an array with an object containing packagePath and keypath.
Error: ENOENT: no such file or directory, open '.../config.js'
architect.loadConfig path is incorrect or config.js does not exist.
fix
Verify the path passed to architect.loadConfig and that config.js exists.
Upgrade
Version history
2.1.0latest on npm
Audit
Dependencies
architectrequiredPlugin framework required for loading and configuring the module
Agent activity
25 hits · last 30 days
node
20
Resources
bimedia-rest-security — npm install bimedia-rest-security · libregistry