nl_tokens: to handle expiry of the oauth token
pl_tokens: function insureFreshToken ( conn , cb ) { var rh = conn . requestHeaders ; if ( rh && rh . authorization && conn . user && rh . authorization . indexOf ( 'Bearer ' ) === 0 ) { var stashedToken = tokenMgmt . currentToken ( conn . user , <mask> . loginBaseUrl , conn . mgmtServer ) ; if ( tokenMgmt . isInvalidOrExpired ( stashedToken ) ) { return conn . refreshToken ( stashedToken , function ( e , result ) { if ( e ) { throw new Error ( 'error refreshing token: ' + e ) ; } cb ( merge ( true , { headers : rh } ) ) ; } ) ; } else { cb ( merge ( true , { headers : rh } ) ) ; } } else { cb ( merge ( true , { headers : rh } ) ) ; } }