Remove addOpenIDMixins in favor of re-worked approach.

This commit is contained in:
Jared Hanson 2012-06-14 18:50:12 -07:00
Родитель a74a78f0ba
Коммит 1823c58e53
1 изменённых файлов: 0 добавлений и 43 удалений

Просмотреть файл

@ -401,49 +401,6 @@ Strategy.prototype._parseProfileExt = function(params) {
return profile;
}
/**
* Allow the addition of mixins to the OpenID library.
*
* As simple as merging the passed object into the included openid library,
* primarily intended for implementing a different storage mechanism for
* saving association state.
* See https://github.com/havard/node-openid/#storing-association-state
*
* Examples:
*
* passport.use(new OpenIDStrategy({
* returnURL: 'http://localhost:3000/auth/openid/return',
* realm: 'http://localhost:3000/'
* },
* function(identifier, done) {
* User.findByOpenID(identifier, function (err, user) {
* done(err, user);
* });
* }
* ).addOpenIDMixins({
* saveAssociation: function(provider, type, handle, secret, expiry_time_in_seconds, callback) {
* // custom storage implementation
* },
* loadAssociation: function(handle, callback) {
// custom storage retrieval implementation
* }
* }));
*
* @param {Object} mixins
* @api protected
*/
Strategy.prototype.addOpenIDMixins = function(mixins) {
//i maybe replace this with a more robust copy routine
if (mixins) {
for (var p in mixins) {
openid[p] = mixins[p];
}
}
// return this for chaining
return this;
};
/**
* Expose `Strategy`.