verdaccio-auth-memory 10.0.0 → 11.0.0-6-next.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.babelrc ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "../../../.babelrc"
3
+ }
package/CHANGELOG.md CHANGED
@@ -1,263 +1,227 @@
1
1
  # Change Log
2
2
 
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
3
+ ## 11.0.0-6-next.6
5
4
 
6
- # [10.0.0](https://github.com/verdaccio/monorepo/compare/v9.7.5...v10.0.0) (2021-03-29)
5
+ ### Patch Changes
7
6
 
8
- **Note:** Version bump only for package verdaccio-auth-memory
7
+ - Updated dependencies [6c1eb021]
8
+ - @verdaccio/core@6.0.0-6-next.3
9
9
 
10
+ ## 11.0.0-6-next.5
10
11
 
12
+ ### Major Changes
11
13
 
14
+ - 794af76c: Remove Node 12 support
12
15
 
16
+ - We need move to the new `undici` and does not support Node.js 12
13
17
 
14
- ## [9.7.2](https://github.com/verdaccio/monorepo/compare/v9.7.1...v9.7.2) (2020-07-20)
18
+ ### Minor Changes
15
19
 
16
- **Note:** Version bump only for package verdaccio-auth-memory
20
+ - 154b2ecd: refactor: remove @verdaccio/commons-api in favor @verdaccio/core and remove duplications
17
21
 
22
+ ### Patch Changes
18
23
 
24
+ - Updated dependencies [794af76c]
25
+ - Updated dependencies [154b2ecd]
26
+ - @verdaccio/core@6.0.0-6-next.2
19
27
 
28
+ ## 11.0.0-6-next.4
20
29
 
30
+ ### Patch Changes
21
31
 
22
- ## [9.7.1](https://github.com/verdaccio/monorepo/compare/v9.7.0...v9.7.1) (2020-07-10)
32
+ - Updated dependencies [459b6fa7]
33
+ - @verdaccio/commons-api@11.0.0-6-next.4
23
34
 
24
- **Note:** Version bump only for package verdaccio-auth-memory
35
+ ## 10.0.0-alpha.3
25
36
 
37
+ ### Patch Changes
26
38
 
39
+ - fecbb9be: chore: add release step to private regisry on merge changeset pr
40
+ - Updated dependencies [fecbb9be]
41
+ - @verdaccio/commons-api@10.0.0-alpha.3
27
42
 
43
+ ## 10.0.0-alpha.2
28
44
 
45
+ ### Minor Changes
29
46
 
30
- # [9.7.0](https://github.com/verdaccio/monorepo/compare/v9.6.1...v9.7.0) (2020-06-24)
47
+ - 54c58d1e: feat: add server rate limit protection to all request
31
48
 
32
- **Note:** Version bump only for package verdaccio-auth-memory
49
+ To modify custom values, use the server settings property.
33
50
 
51
+ ```markdown
52
+ server:
34
53
 
54
+ ## https://www.npmjs.com/package/express-rate-limit#configuration-options
35
55
 
56
+ rateLimit:
57
+ windowMs: 1000
58
+ max: 10000
59
+ ```
36
60
 
61
+ The values are intended to be high, if you want to improve security of your server consider
62
+ using different values.
37
63
 
38
- ## [9.6.1](https://github.com/verdaccio/monorepo/compare/v9.6.0...v9.6.1) (2020-06-07)
64
+ ### Patch Changes
39
65
 
40
- **Note:** Version bump only for package verdaccio-auth-memory
66
+ - Updated dependencies [54c58d1e]
67
+ - @verdaccio/commons-api@10.0.0-alpha.2
41
68
 
69
+ ## 10.0.0-alpha.1
42
70
 
71
+ ### Major Changes
43
72
 
73
+ - d87fa026: feat!: experiments config renamed to flags
44
74
 
75
+ - The `experiments` configuration is renamed to `flags`. The functionality is exactly the same.
45
76
 
46
- # [9.5.0](https://github.com/verdaccio/monorepo/compare/v9.4.1...v9.5.0) (2020-05-02)
47
-
48
- **Note:** Version bump only for package verdaccio-auth-memory
77
+ ```js
78
+ flags: token: false;
79
+ search: false;
80
+ ```
49
81
 
82
+ - The `self_path` property from the config file is being removed in favor of `config_file` full path.
83
+ - Refactor `config` module, better types and utilities
50
84
 
85
+ ### Patch Changes
51
86
 
87
+ - Updated dependencies [d87fa026]
88
+ - Updated dependencies [da1ee9c8]
89
+ - Updated dependencies [26b494cb]
90
+ - Updated dependencies [b57b4338]
91
+ - Updated dependencies [31af0164]
92
+ - @verdaccio/commons-api@10.0.0-alpha.1
52
93
 
94
+ All notable changes to this project will be documented in this file.
95
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
53
96
 
54
- # [9.4.0](https://github.com/verdaccio/monorepo/compare/v9.3.4...v9.4.0) (2020-03-21)
97
+ ## [9.7.2](https://github.com/verdaccio/monorepo/compare/v9.7.1...v9.7.2) (2020-07-20)
55
98
 
56
99
  **Note:** Version bump only for package verdaccio-auth-memory
57
100
 
101
+ ## [9.7.1](https://github.com/verdaccio/monorepo/compare/v9.7.0...v9.7.1) (2020-07-10)
58
102
 
103
+ **Note:** Version bump only for package verdaccio-auth-memory
59
104
 
60
-
61
-
62
- ## [9.3.2](https://github.com/verdaccio/monorepo/compare/v9.3.1...v9.3.2) (2020-03-08)
105
+ # [9.7.0](https://github.com/verdaccio/monorepo/compare/v9.6.1...v9.7.0) (2020-06-24)
63
106
 
64
107
  **Note:** Version bump only for package verdaccio-auth-memory
65
108
 
109
+ ## [9.6.1](https://github.com/verdaccio/monorepo/compare/v9.6.0...v9.6.1) (2020-06-07)
66
110
 
111
+ **Note:** Version bump only for package verdaccio-auth-memory
67
112
 
113
+ # [9.5.0](https://github.com/verdaccio/monorepo/compare/v9.4.1...v9.5.0) (2020-05-02)
68
114
 
115
+ **Note:** Version bump only for package verdaccio-auth-memory
69
116
 
70
- ## [9.3.1](https://github.com/verdaccio/monorepo/compare/v9.3.0...v9.3.1) (2020-02-23)
117
+ # [9.4.0](https://github.com/verdaccio/monorepo/compare/v9.3.4...v9.4.0) (2020-03-21)
71
118
 
72
119
  **Note:** Version bump only for package verdaccio-auth-memory
73
120
 
121
+ ## [9.3.2](https://github.com/verdaccio/monorepo/compare/v9.3.1...v9.3.2) (2020-03-08)
74
122
 
123
+ **Note:** Version bump only for package verdaccio-auth-memory
75
124
 
125
+ ## [9.3.1](https://github.com/verdaccio/monorepo/compare/v9.3.0...v9.3.1) (2020-02-23)
76
126
 
127
+ **Note:** Version bump only for package verdaccio-auth-memory
77
128
 
78
129
  # [9.3.0](https://github.com/verdaccio/monorepo/compare/v9.2.0...v9.3.0) (2020-01-29)
79
130
 
80
131
  **Note:** Version bump only for package verdaccio-auth-memory
81
132
 
82
-
83
-
84
-
85
-
86
133
  # [9.0.0](https://github.com/verdaccio/monorepo/compare/v8.5.3...v9.0.0) (2020-01-07)
87
134
 
88
135
  **Note:** Version bump only for package verdaccio-auth-memory
89
136
 
90
-
91
-
92
-
93
-
94
137
  ## [8.5.2](https://github.com/verdaccio/monorepo/compare/v8.5.1...v8.5.2) (2019-12-25)
95
138
 
96
139
  **Note:** Version bump only for package verdaccio-auth-memory
97
140
 
98
-
99
-
100
-
101
-
102
141
  ## [8.5.1](https://github.com/verdaccio/monorepo/compare/v8.5.0...v8.5.1) (2019-12-24)
103
142
 
104
143
  **Note:** Version bump only for package verdaccio-auth-memory
105
144
 
106
-
107
-
108
-
109
-
110
145
  # [8.5.0](https://github.com/verdaccio/monorepo/compare/v8.4.2...v8.5.0) (2019-12-22)
111
146
 
112
147
  **Note:** Version bump only for package verdaccio-auth-memory
113
148
 
114
-
115
-
116
-
117
-
118
149
  ## [8.4.2](https://github.com/verdaccio/monorepo/compare/v8.4.1...v8.4.2) (2019-11-23)
119
150
 
120
151
  **Note:** Version bump only for package verdaccio-auth-memory
121
152
 
122
-
123
-
124
-
125
-
126
153
  ## [8.4.1](https://github.com/verdaccio/monorepo/compare/v8.4.0...v8.4.1) (2019-11-22)
127
154
 
128
155
  **Note:** Version bump only for package verdaccio-auth-memory
129
156
 
130
-
131
-
132
-
133
-
134
157
  # [8.4.0](https://github.com/verdaccio/monorepo/compare/v8.3.0...v8.4.0) (2019-11-22)
135
158
 
136
159
  **Note:** Version bump only for package verdaccio-auth-memory
137
160
 
138
-
139
-
140
-
141
-
142
161
  # [8.3.0](https://github.com/verdaccio/monorepo/compare/v8.2.0...v8.3.0) (2019-10-27)
143
162
 
144
163
  **Note:** Version bump only for package verdaccio-auth-memory
145
164
 
146
-
147
-
148
-
149
-
150
165
  # [8.2.0](https://github.com/verdaccio/monorepo/compare/v8.2.0-next.0...v8.2.0) (2019-10-23)
151
166
 
152
167
  **Note:** Version bump only for package verdaccio-auth-memory
153
168
 
154
-
155
-
156
-
157
-
158
169
  # [8.2.0-next.0](https://github.com/verdaccio/monorepo/compare/v8.1.4...v8.2.0-next.0) (2019-10-08)
159
170
 
160
-
161
171
  ### Bug Fixes
162
172
 
163
- * fixed lint errors ([5e677f7](https://github.com/verdaccio/monorepo/commit/5e677f7))
164
-
165
-
166
-
167
-
173
+ - fixed lint errors ([5e677f7](https://github.com/verdaccio/monorepo/commit/5e677f7))
168
174
 
169
175
  ## [8.1.2](https://github.com/verdaccio/monorepo/compare/v8.1.1...v8.1.2) (2019-09-29)
170
176
 
171
177
  **Note:** Version bump only for package verdaccio-auth-memory
172
178
 
173
-
174
-
175
-
176
-
177
179
  ## [8.1.1](https://github.com/verdaccio/monorepo/compare/v8.1.0...v8.1.1) (2019-09-26)
178
180
 
179
181
  **Note:** Version bump only for package verdaccio-auth-memory
180
182
 
181
-
182
-
183
-
184
-
185
183
  # [8.1.0](https://github.com/verdaccio/monorepo/compare/v8.0.1-next.1...v8.1.0) (2019-09-07)
186
184
 
187
185
  **Note:** Version bump only for package verdaccio-auth-memory
188
186
 
189
-
190
-
191
-
192
-
193
187
  ## [8.0.1-next.1](https://github.com/verdaccio/monorepo/compare/v8.0.1-next.0...v8.0.1-next.1) (2019-08-29)
194
188
 
195
189
  **Note:** Version bump only for package verdaccio-auth-memory
196
190
 
197
-
198
-
199
-
200
-
201
191
  ## [8.0.1-next.0](https://github.com/verdaccio/monorepo/compare/v8.0.0...v8.0.1-next.0) (2019-08-29)
202
192
 
203
193
  **Note:** Version bump only for package verdaccio-auth-memory
204
194
 
205
-
206
-
207
-
208
-
209
195
  # [8.0.0](https://github.com/verdaccio/monorepo/compare/v8.0.0-next.4...v8.0.0) (2019-08-22)
210
196
 
211
197
  **Note:** Version bump only for package verdaccio-auth-memory
212
198
 
213
-
214
-
215
-
216
-
217
199
  # [8.0.0-next.4](https://github.com/verdaccio/monorepo/compare/v8.0.0-next.3...v8.0.0-next.4) (2019-08-18)
218
200
 
219
201
  **Note:** Version bump only for package verdaccio-auth-memory
220
202
 
221
-
222
-
223
-
224
-
225
203
  # [8.0.0-next.2](https://github.com/verdaccio/monorepo/compare/v8.0.0-next.1...v8.0.0-next.2) (2019-08-03)
226
204
 
227
205
  **Note:** Version bump only for package verdaccio-auth-memory
228
206
 
229
-
230
-
231
-
232
-
233
207
  # [8.0.0-next.1](https://github.com/verdaccio/monorepo/compare/v8.0.0-next.0...v8.0.0-next.1) (2019-08-01)
234
208
 
235
209
  **Note:** Version bump only for package verdaccio-auth-memory
236
210
 
237
-
238
-
239
-
240
-
241
211
  # [8.0.0-next.0](https://github.com/verdaccio/monorepo/compare/v2.0.0...v8.0.0-next.0) (2019-08-01)
242
212
 
243
-
244
213
  ### Bug Fixes
245
214
 
246
- * main file is correct routed ([245b115](https://github.com/verdaccio/monorepo/commit/245b115))
247
- * remove source maps ([6ca4895](https://github.com/verdaccio/monorepo/commit/6ca4895))
248
- * restore error messages ([5d241b6](https://github.com/verdaccio/monorepo/commit/5d241b6))
249
-
215
+ - main file is correct routed ([245b115](https://github.com/verdaccio/monorepo/commit/245b115))
216
+ - remove source maps ([6ca4895](https://github.com/verdaccio/monorepo/commit/6ca4895))
217
+ - restore error messages ([5d241b6](https://github.com/verdaccio/monorepo/commit/5d241b6))
250
218
 
251
219
  ### Features
252
220
 
253
- * add logging output for each action ([66f183c](https://github.com/verdaccio/monorepo/commit/66f183c))
254
- * change password ([de0a341](https://github.com/verdaccio/monorepo/commit/de0a341))
255
- * migrate to typescript BREAKING CHANGE: new compiler might bring issues ([13ebde2](https://github.com/verdaccio/monorepo/commit/13ebde2))
256
- * **config:** allow set users ([e5326fd](https://github.com/verdaccio/monorepo/commit/e5326fd))
257
-
258
-
259
-
260
-
221
+ - add logging output for each action ([66f183c](https://github.com/verdaccio/monorepo/commit/66f183c))
222
+ - change password ([de0a341](https://github.com/verdaccio/monorepo/commit/de0a341))
223
+ - migrate to typescript BREAKING CHANGE: new compiler might bring issues ([13ebde2](https://github.com/verdaccio/monorepo/commit/13ebde2))
224
+ - **config:** allow set users ([e5326fd](https://github.com/verdaccio/monorepo/commit/e5326fd))
261
225
 
262
226
  # Changelog
263
227
 
@@ -265,90 +229,63 @@ All notable changes to this project will be documented in this file. See [standa
265
229
 
266
230
  ### [1.1.5](https://github.com/verdaccio/verdaccio-auth-memory/compare/v1.1.4...v1.1.5) (2019-07-15)
267
231
 
268
-
269
232
  ### Bug Fixes
270
233
 
271
- * restore error messages ([094da45](https://github.com/verdaccio/verdaccio-auth-memory/commit/094da45))
272
-
273
-
234
+ - restore error messages ([094da45](https://github.com/verdaccio/verdaccio-auth-memory/commit/094da45))
274
235
 
275
236
  ### [1.1.4](https://github.com/verdaccio/verdaccio-auth-memory/compare/v1.1.3...v1.1.4) (2019-07-15)
276
237
 
277
-
278
238
  ### Tests
279
239
 
280
- * fix wrong string match ([d4d2e81](https://github.com/verdaccio/verdaccio-auth-memory/commit/d4d2e81))
281
-
282
-
240
+ - fix wrong string match ([d4d2e81](https://github.com/verdaccio/verdaccio-auth-memory/commit/d4d2e81))
283
241
 
284
242
  ### [1.1.3](https://github.com/verdaccio/verdaccio-auth-memory/compare/v1.1.2...v1.1.3) (2019-07-15)
285
243
 
286
-
287
244
  ### Build System
288
245
 
289
- * update @verdaccio/commons-api@0.1.2 ([55f39a4](https://github.com/verdaccio/verdaccio-auth-memory/commit/55f39a4))
290
-
291
-
246
+ - update @verdaccio/commons-api@0.1.2 ([55f39a4](https://github.com/verdaccio/verdaccio-auth-memory/commit/55f39a4))
292
247
 
293
248
  ### [1.1.2](https://github.com/verdaccio/verdaccio-auth-memory/compare/v1.1.1...v1.1.2) (2019-07-15)
294
249
 
295
-
296
250
  ### Build System
297
251
 
298
- * build step before publish ([468ddbc](https://github.com/verdaccio/verdaccio-auth-memory/commit/468ddbc))
299
-
300
-
252
+ - build step before publish ([468ddbc](https://github.com/verdaccio/verdaccio-auth-memory/commit/468ddbc))
301
253
 
302
254
  ### [1.1.1](https://github.com/verdaccio/verdaccio-auth-memory/compare/v1.1.0...v1.1.1) (2019-07-12)
303
255
 
304
-
305
256
  ### Build System
306
257
 
307
- * fix unit test ([6d7b383](https://github.com/verdaccio/verdaccio-auth-memory/commit/6d7b383))
308
-
309
-
258
+ - fix unit test ([6d7b383](https://github.com/verdaccio/verdaccio-auth-memory/commit/6d7b383))
310
259
 
311
260
  ## [1.1.0](https://github.com/verdaccio/verdaccio-auth-memory/compare/v1.0.2...v1.1.0) (2019-07-12)
312
261
 
313
-
314
262
  ### Features
315
263
 
316
- * add logging output for each action ([099f9aa](https://github.com/verdaccio/verdaccio-auth-memory/commit/099f9aa))
317
-
318
-
264
+ - add logging output for each action ([099f9aa](https://github.com/verdaccio/verdaccio-auth-memory/commit/099f9aa))
319
265
 
320
266
  ### [1.0.2](https://github.com/verdaccio/verdaccio-auth-memory/compare/v1.0.1...v1.0.2) (2019-07-12)
321
267
 
322
-
323
268
  ### Bug Fixes
324
269
 
325
- * main file is correct routed ([722a615](https://github.com/verdaccio/verdaccio-auth-memory/commit/722a615))
326
-
327
-
270
+ - main file is correct routed ([722a615](https://github.com/verdaccio/verdaccio-auth-memory/commit/722a615))
328
271
 
329
272
  ### [1.0.1](https://github.com/verdaccio/verdaccio-auth-memory/compare/v1.0.0...v1.0.1) (2019-07-12)
330
273
 
331
-
332
274
  ### Bug Fixes
333
275
 
334
- * remove source maps ([6f29a06](https://github.com/verdaccio/verdaccio-auth-memory/commit/6f29a06))
335
-
336
-
276
+ - remove source maps ([6f29a06](https://github.com/verdaccio/verdaccio-auth-memory/commit/6f29a06))
337
277
 
338
278
  ## [1.0.0](https://github.com/verdaccio/verdaccio-auth-memory/compare/v0.0.4...v1.0.0) (2019-07-12)
339
279
 
340
-
341
280
  ### Build System
342
281
 
343
- * add coverage build script ([4f25313](https://github.com/verdaccio/verdaccio-auth-memory/commit/4f25313))
344
-
282
+ - add coverage build script ([4f25313](https://github.com/verdaccio/verdaccio-auth-memory/commit/4f25313))
345
283
 
346
284
  ### Features
347
285
 
348
- * change password ([19d9838](https://github.com/verdaccio/verdaccio-auth-memory/commit/19d9838))
349
- * migrate to typescript ([4c3b144](https://github.com/verdaccio/verdaccio-auth-memory/commit/4c3b144))
350
-
286
+ - change password ([19d9838](https://github.com/verdaccio/verdaccio-auth-memory/commit/19d9838))
287
+ - migrate to typescript ([4c3b144](https://github.com/verdaccio/verdaccio-auth-memory/commit/4c3b144))
351
288
 
352
289
  ### BREAKING CHANGES
353
290
 
354
- * new compiler might bring issues
291
+ - new compiler might bring issues
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # verdaccio-auth-memory
2
+
2
3
  [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fverdaccio%2Fverdaccio-auth-memory.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fverdaccio%2Fverdaccio-auth-memory?ref=badge_shield)
3
4
  [![CircleCI](https://circleci.com/gh/verdaccio/verdaccio-auth-memory.svg?style=svg)](https://circleci.com/gh/ayusharma/verdaccio-auth-memory)
4
5
  [![codecov](https://codecov.io/gh/verdaccio/verdaccio-auth-memory/branch/master/graph/badge.svg)](https://codecov.io/gh/verdaccio/verdaccio-auth-memory)
5
6
 
6
-
7
7
  This verdaccio auth plugin keeps the users in a memory plain object.
8
8
  This means all sessions and users will disappear when you restart the verdaccio server.
9
9
 
@@ -44,46 +44,49 @@ plugin(config, appConfig);
44
44
 
45
45
  Where:
46
46
 
47
- - config - module's own config
48
- - appOptions - collection of different internal verdaccio objects
49
- - appOptions.config - main config
50
- - appOptions.logger - logger
47
+ - config - module's own config
48
+ - appOptions - collection of different internal verdaccio objects
49
+ - appOptions.config - main config
50
+ - appOptions.logger - logger
51
51
 
52
52
  This should export four functions:
53
53
 
54
- - `adduser(user, password, cb)` Add new users
54
+ - `adduser(user, password, cb)` Add new users
55
+
56
+ It should respond with:
55
57
 
56
- It should respond with:
57
- - `cb(err)` in case of an error (error will be returned to user)
58
- - `cb(null, false)` in case registration is disabled (next auth plugin will be executed)
59
- - `cb(null, true)` in case user registered successfully
58
+ - `cb(err)` in case of an error (error will be returned to user)
59
+ - `cb(null, false)` in case registration is disabled (next auth plugin will be executed)
60
+ - `cb(null, true)` in case user registered successfully
60
61
 
61
- It's useful to set `err.status` property to set http status code (e.g. `err.status = 403`).
62
+ It's useful to set `err.status` property to set http status code (e.g. `err.status = 403`).
62
63
 
63
- - `authenticate(user, password, cb)` Authenticate the user
64
+ - `authenticate(user, password, cb)` Authenticate the user
64
65
 
65
- It should respond with:
66
- - `cb(err)` in case of a fatal error (error will be returned to user, keep those rare)
67
- - `cb(null, false)` in case user not authenticated (next auth plugin will be executed)
68
- - `cb(null, [groups])` in case user is authenticated
66
+ It should respond with:
69
67
 
70
- Groups is an array of all users/usergroups this user has access to. You should probably include username itself here.
68
+ - `cb(err)` in case of a fatal error (error will be returned to user, keep those rare)
69
+ - `cb(null, false)` in case user not authenticated (next auth plugin will be executed)
70
+ - `cb(null, [groups])` in case user is authenticated
71
71
 
72
- - `allow_access(user, pkg, cb)` Check whether the user has permissions to access a resource (package)
72
+ Groups is an array of all users/usergroups this user has access to. You should probably include username itself here.
73
73
 
74
- It should respond with:
75
- - `cb(err)` in case of a fatal error (error will be returned to user, keep those rare)
76
- - `cb(null, false)` in case user not allowed to access (next auth plugin will be executed)
77
- - `cb(null, true)` in case user is allowed to access
74
+ - `allow_access(user, pkg, cb)` Check whether the user has permissions to access a resource (package)
78
75
 
79
- - `allow_publish(user, pkg, cb)` Check whether the user has permissions to publish a resource (package)
76
+ It should respond with:
80
77
 
81
- It should respond with:
82
- - `cb(err)` in case of a fatal error (error will be returned to user, keep those rare)
83
- - `cb(null, false)` in case user not allowed to publish (next auth plugin will be executed)
84
- - `cb(null, true)` in case user is allowed to publish
78
+ - `cb(err)` in case of a fatal error (error will be returned to user, keep those rare)
79
+ - `cb(null, false)` in case user not allowed to access (next auth plugin will be executed)
80
+ - `cb(null, true)` in case user is allowed to access
85
81
 
82
+ - `allow_publish(user, pkg, cb)` Check whether the user has permissions to publish a resource (package)
86
83
 
84
+ It should respond with:
85
+
86
+ - `cb(err)` in case of a fatal error (error will be returned to user, keep those rare)
87
+ - `cb(null, false)` in case user not allowed to publish (next auth plugin will be executed)
88
+ - `cb(null, true)` in case user is allowed to publish
87
89
 
88
90
  ## License
91
+
89
92
  [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fverdaccio%2Fverdaccio-auth-memory.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fverdaccio%2Fverdaccio-auth-memory?ref=badge_large)
@@ -1,5 +1,5 @@
1
1
  import { PluginOptions, Callback, PackageAccess, IPluginAuth, RemoteUser, Logger } from '@verdaccio/types';
2
- import { VerdaccioMemoryConfig, Users } from '../types/index';
2
+ import { VerdaccioMemoryConfig, Users } from './types';
3
3
  export default class Memory implements IPluginAuth<VerdaccioMemoryConfig> {
4
4
  _logger: Logger;
5
5
  _users: Users;