remove app.keys getter/setter

closes #203
This commit is contained in:
Jonathan Ong 2014-01-31 16:09:29 -08:00
parent 6029df4499
commit ea5757ff57

View file

@ -105,39 +105,6 @@ app.callback = function(){
} }
}; };
/**
* Set signed cookie keys.
*
* These are passed to [KeyGrip](https://github.com/jed/keygrip),
* however you may also pass your own `KeyGrip` instance. For
* example the following are acceptable:
*
* app.keys = ['im a newer secret', 'i like turtle'];
* app.keys = new KeyGrip(['im a newer secret', 'i like turtle'], 'sha256');
*
* @param {Array|KeyGrip} keys
* @api public
*/
app.__defineSetter__('keys', function(keys){
var ok = keys && (Array.isArray(keys)
|| (keys.constructor && keys.constructor.name === 'Keygrip'));
debug('keys %j', keys);
if (!ok) throw new TypeError('app.keys must be an array or Keygrip');
this._keys = keys;
});
/**
* Get `Keygrip` instance.
*
* @return {Keygrip}
* @api public
*/
app.__defineGetter__('keys', function(){
return this._keys;
});
/** /**
* Initialize a new context. * Initialize a new context.
* *