Skip to content

Commit

Permalink
Added export for abstract authentication mechanism. Fixes #47
Browse files Browse the repository at this point in the history
  • Loading branch information
krnekit committed Jun 6, 2014
1 parent e181dda commit f9e62d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = {

// SASL
auth: {
AbstractMechanism: require('./lib/authentication/mechanism'),
Plain: require('./lib/authentication/plain'),
DigestMD5: require('./lib/authentication/digestmd5'),
XOAuth2: require('./lib/authentication/xoauth2'),
Expand Down
5 changes: 5 additions & 0 deletions lib/authentication/mechanism.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,9 @@ Mechanism.prototype = {
}
}

// This method should be overrriden in custom mechanisms
Mechanism.prototype.extractSasl = function(auth) {
throw new Error('This is an abstract method, you should overrride it')
}

module.exports = Mechanism

0 comments on commit f9e62d7

Please sign in to comment.