bluemix.js
function refreshProxyAccessToken() {
        settings.AZTokenProvider().then(function(token) {
            proxyAccessToken = token;
            logger.log('Refreshed proxy access token: ' + proxyAccessToken);
        }, function(err) {
            logger.log(err);
            emitter.emit('error', 'Unable to refresh access token from AZTokenProvider');
            return null;
       });
    }
function refreshProxyAccessToken() {
        settings.AZTokenProvider().then(function(token) {
            proxyAccessToken = token;
            logger.log('Refreshed proxy access token: ' + proxyAccessToken);
        }, function(err) {
            logger.log(err);
            emitter.emit('error', 'Unable to refresh access token from AZTokenProvider');
            return null;
       });
    }
function refreshProxyAccessToken ( ) { settings . AZTokenProvider ( ) . then ( function ( token ) { proxyAccessToken = token ; logger . log ( 'Refreshed proxy access token: ' + proxyAccessToken ) ; } , function ( err ) { logger . log ( err ) ; emitter . emit ( 'error' , 'Unable to refresh access token from AZTokenProvider' ) ; return null ; } ) ; }
After invoking this function, one must invoke elasticsearchOptions again in order for new access token to be used.
After invoking this function one must invoke elasticsearchOptions again in order for new access token to be used .