1 | var pull = require('pull-stream')
|
2 |
|
3 | module.exports = function (opts) {
|
4 | return {
|
5 | name: 'noauth',
|
6 | create: function (_opts) {
|
7 | return function (stream, cb) {
|
8 | cb(null, {
|
9 | remote: opts.keys.publicKey,
|
10 | auth: { allow: null, deny: null },
|
11 | source: stream.source,
|
12 | sink: stream.sink,
|
13 | address: 'noauth:' + opts.keys.publicKey.toString('base64')
|
14 | })
|
15 | }
|
16 | },
|
17 | parse: function (str) {
|
18 | return {}
|
19 | },
|
20 | stringify: function () {
|
21 | return 'noauth'
|
22 | }
|
23 | }
|
24 | }
|