function validateSession(sessionObject) {
                if (sessionObject === undefined) {
                    sessionObject = sessionObject;
                }
                if (!sessionObject) {
                    return false;
                }

                if (!(sessionObject.sessionId && sessionObject.username && sessionObject.token && sessionObject.tokenObject)) {
                    return false;
                }

                if (hasExpired(sessionObject)) {
                    return false;
                }
                return true;
            }
/**
             * Given a session object, ensure that it is valid, to best of our
             * ability. It serves as the gateway between the externally stored
             * session cookie, and the internally stored session object.
             * 
             * It probably should not be the responsibility of the front end
             * to front end to evaluate the session -- that should be conducted
             * by a back-end service -- but this is the way it works now.
             * 
             * Validation consists of ensuring that the session object is complete,
             * and that it has not expired. The expiration date derives from the
             * Globus auth token. The evaluation of this is one of my bigger 
             * problems.
             * 
             * @function validateSession
             * @private
             * 
             * @param {Object} - the prospective session object
             * @returns {boolean} - if the session is valid.
             */
Given a session object, ensure that it is valid, to best of our
ability. It serves as the gateway between the externally stored
session cookie, and the internally stored session object.



Validation consists of ensuring that the session object is complete,
and that it has not expired. The expiration date derives from the
Globus auth token. The evaluation of this is one of my bigger
problems.

@function validateSession
@private

@param {Object} - the prospective session object
@returns {boolean} - if the session is valid.
Given a session object ensure that it is valid to best of our ability . It serves as the gateway between the externally stored session cookie and the internally stored session object . Validation consists of ensuring that the session object is complete and that it has not expired . The expiration date derives from the Globus auth token . The evaluation of this is one of my bigger problems . @function validateSession @private @param { Object } - the prospective session object @returns { boolean } - if the session is valid .
function validateSession(sessionObject) {
                if (sessionObject === undefined) {
                    sessionObject = sessionObject;
                }
                if (!sessionObject) {
                    return false;
                }
                if (!(sessionObject.sessionId && sessionObject.username && sessionObject.token && sessionObject.tokenObject)) {
                    return false;
                }
                if (hasExpired(sessionObject)) {
                    return false;
                }
                return true;
            }
function validateSession ( sessionObject ) { if ( sessionObject === undefined ) { sessionObject = sessionObject ; } if ( ! sessionObject ) { return false ; } if ( ! ( sessionObject . sessionId && sessionObject . username && sessionObject . token && sessionObject . tokenObject ) ) { return false ; } if ( hasExpired ( sessionObject ) ) { return false ; } return true ; }
Given a session object, ensure that it is valid, to best of our
 ability.
Given a session object ensure that it is valid to best of our ability .