Session.load()

Load a string from the session using the specified key.

Usage

Hover over inputs/exits for more info.

var Session = require('machinepack-session');


// Load a string from the session using the specified key.

Session.load({

key: 'loggedInAs',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// No value was found in this user session under the specified key.

notFound: function () {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

key required

The name of the key in the session store.

'loggedInAs'

Exits

error

An unexpected error occurred.

notFound

No value was found in this user session under the specified key.

success

OK.

'some string'