parent
6029df4499
commit
ea5757ff57
1 changed files with 0 additions and 33 deletions
|
@ -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.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue