Socket
Socket
Sign inDemoInstall

verdaccio-auth-memory

Package Overview
Dependencies
Maintainers
1
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

verdaccio-auth-memory - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

6

index.js
'use strict';
function Memory(config, stuff) {
function Memory(config, appOptions) {
const self = Object.create(Memory.prototype);

@@ -8,4 +8,4 @@

self._config = config;
self._logger = stuff.logger;
self._app_config = stuff.config;
self._logger = appOptions.logger;
self._app_config = appOptions.config;

@@ -12,0 +12,0 @@ return self

{
"name": "verdaccio-auth-memory",
"version": "0.0.3",
"version": "0.0.4",
"description": "auth plugin for verdaccio that keeps users in memory",

@@ -5,0 +5,0 @@ "author": "Verdaccio community <verdaccio.npm@gmail.com>",

@@ -11,4 +11,4 @@ # verdaccio-auth-memory

```sh
$ npm install verdaccio
$ npm install verdaccio-auth-memory-memory
$ npm install -g verdaccio
$ npm install -g verdaccio-auth-memory-memory
```

@@ -22,3 +22,10 @@

auth:
auth-memory: true
auth-memory:
users:
foo:
name: foo
password: s3cret
bar:
name: bar
password: s3cret
```

@@ -31,3 +38,5 @@

```js
require('verdaccio-auth-memory')(config, stuff)
const plugin = require('verdaccio-auth-memory');
plugin(config, appConfig);
```

@@ -38,9 +47,9 @@

- config - module's own config
- stuff - collection of different internal verdaccio objects
- stuff.config - main config
- stuff.logger - logger
- appOptions - collection of different internal verdaccio objects
- appOptions.config - main config
- appOptions.logger - logger
This should export two functions:
This should export four functions:
- `adduser(user, password, cb)`
- `adduser(user, password, cb)` Add new users

@@ -54,3 +63,3 @@ It should respond with:

- `authenticate(user, password, cb)`
- `authenticate(user, password, cb)` Authenticate the user

@@ -64,2 +73,15 @@ It should respond with:

- `allow_access(user, pkg, cb)` Check whether the user has permissions to access a resource (package)
It should respond with:
- `cb(err)` in case of a fatal error (error will be returned to user, keep those rare)
- `cb(null, false)` in case user not allowed to access (next auth plugin will be executed)
- `cb(null, true)` in case user is allowed to access
- `allow_publish(user, pkg, cb)` Check whether the user has permissions to publish a resource (package)
It should respond with:
- `cb(err)` in case of a fatal error (error will be returned to user, keep those rare)
- `cb(null, false)` in case user not allowed to publish (next auth plugin will be executed)
- `cb(null, true)` in case user is allowed to publish
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