src/authentication.js
/*
 Check token is authenticated. Optionally checks for valid application UUID
 */
Check token is authenticated. Optionally checks for valid application UUID
Check token is authenticated . Optionally checks for valid application UUID
function authenticateToken(checkAppUuid) {
    return function(token, callback) {
        var authenticAppUuid = !checkAppUuid || this.applicationUUID === getPath(token, 'application.auth.uuid');
        var authenticated = token.expiry > Date.now() && authenticAppUuid;
        return callback(null, authenticated ? token : null);
    }
}
function authenticateToken ( checkAppUuid ) { return function ( token , callback ) { var authenticAppUuid = ! checkAppUuid || this . applicationUUID === getPath ( token , 'application.auth.uuid' ) ; var authenticated = token . expiry > Date . now ( ) && authenticAppUuid ; return callback ( null , authenticated ? token : null ) ; } }
Check token is authenticated.
Check token is authenticated .