Esempio n. 1
0
 /**
  * Return raw value for a given key. Cookie will not be
  * encrypted or unsigned.
  *
  * @method plainCookie
  *
  * @param  {String}    key
  * @param  {Mixed}     [defaultValue]
  *
  * @return {Mixed}
  */
 plainCookie (key, defaultValue) {
   return _.defaultTo(nodeCookie.get(this.request, key), defaultValue)
 }
Esempio n. 2
0
 /**
  * Returns cookie value for a given key.
  *
  * This method will make use of `app.secret` from the config
  * directory.
  *
  * @method cookie
  *
  * @param  {String} key
  * @param  {Mixed} [defaultValue]
  *
  * @return {Mixed}
  */
 cookie (key, defaultValue) {
   return _.defaultTo(nodeCookie.get(this.request, key, this.Config.get(SECRET), true), defaultValue)
 }