ssbc / secret-stack

connect peers to each other using secret-handshakes
MIT License
90 stars 19 forks source link

Example #82

Open nichoth opened 2 years ago

nichoth commented 2 years ago

Add an example to the readme that demonstrates connecting two secret-stack instances.

TODO How to incorporate permissions? If you run the example.js file, it results in an error

  message: 'method:myPlugin,foo is not in list of allowed methods',

However, if you include these permission in the plugin, then it works

        permissions: {
            anonymous: { allow: ['foo', 'bar'], deny: [] }
        },

What is a good example for a permissions object? Something that permits things based on who is making a request, not just anonymous.

I assume that part of the purpose of secret-stack and shs is authenticating each end of the peer connection, so that you can be sure the caller has a specific public ID.