
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@seneca/apikey
Advanced tools
A Seneca.js plugin for providing API keys.
![]() | This open source module is sponsored and supported by Voxgig. |
---|
This module is a plugin for the Seneca framework. It provides common actions for supplying API keys to external clients.
API keys are generated and hashed to the same level as passwords.
npm install seneca
npm install seneca-promisify // dependency
npm install seneca-entity // dependency
npm install @seneca/user // dependency
npm install @seneca/apikey
Register a apikey and then create an automatic login for testing.
const Seneca = require('seneca')
var seneca = Seneca()
.use('promisify')
.use('entity')
.use('apikey')
// TODO: complete quick example
Because Seneca treats messages as first-class citizens, 90% of unit testing can be implemented with message scenarios that also provide detailed usage examples:
test
: boolean falsekeysize
: number 32tagsize
: number 8rounds
: number 11salt.bytelen
: number 16salt.format
: string "hex"pepper
: string ""generate_salt
: function generate_saltSet plugin options when loading with:
seneca.use('apikey', { name: value, ... })
Note: foo.bar
in the list above means
{ foo: { bar: ... } }
sys:apikey,generate:key
»Generate a new API key.
{
ok: '`true` if successful',
key: 'key string'
}
sys:apikey,verify:key
»Verify an API key.
{
ok: '`true` if verified',
why: 'explanation code'
}
Copyright (c) 2010-2020, Richard Rodger and other contributors. Licensed under MIT.
FAQs
Apikey management plugin for Seneca
The npm package @seneca/apikey receives a total of 0 weekly downloads. As such, @seneca/apikey popularity was classified as not popular.
We found that @seneca/apikey demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.