resources/assets/js/authenticator.js
// Loop through and re-make requests in the queue
Loop through and re-make requests in the queue
Loop through and re - make requests in the queue
_performRemakeQueue(newToken) {
        for (let i = 0; i < this._remakeQueue.length; i++) {
            let item = this._remakeQueue[i];
            item.request.headers['Authorization'] = newToken;
            Vue.http(item.request).then((response) => {
                item.resolve(response);
            });
        }
        this._flushRemakeQueue();
    }
_performRemakeQueue ( newToken ) { for ( let i = 0 ; i < this . _remakeQueue . length ; i ++ ) { let item = this . _remakeQueue [ i ] ; item . request . headers [ 'Authorization' ] = newToken ; Vue . http ( item . request ) . then ( ( response ) => { item . resolve ( response ) ; } ) ; } this . _flushRemakeQueue ( ) ; }
Loop through and re-make requests in the queue
Loop through and re - make requests in the queue
// tell remakeRequest that the request has been made. // Can't be sure the order in which the requests will complete so // no shift'ing them. Will just clear the queue on completion.