Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add options for overriding methods in broker creation #36

Merged
merged 1 commit into from
Feb 26, 2016

Conversation

pkinney
Copy link
Contributor

@pkinney pkinney commented Feb 26, 2016

authenticate, authorizePublish, authorizeSubscribe, and published methods can be passed in the configuration options when initializing the broker or can be set after the fact as it works now:

var aedes = require('aedes')({
  authenticate: function (client, username, password, callback) {
    callback(null, username === 'skroob' && password === '12345')
  }
)};

Also refactored the options ab it to use a defaults function for clarity.

This addresses #9

…ubscribe, and published methods on broker init.
@pkinney pkinney mentioned this pull request Feb 26, 2016
mcollina added a commit that referenced this pull request Feb 26, 2016
Add options for overriding methods in broker creation
@mcollina mcollina merged commit b118ce8 into moscajs:master Feb 26, 2016
@mcollina
Copy link
Collaborator

Thanks, releasing soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants