dist/corbel.with-polyfills.js
function(params) {
                var accessToken = params.accessToken ? params.accessToken : this.driver.config
                    .get(corbel.Iam.IAM_TOKEN, {}).accessToken;

                if (accessToken && !params.headers.Authorization) {
                    params.headers.Authorization = 'Bearer ' + accessToken;
                    params.withCredentials = true;
                } else if (params.headers.Authorization) {
                    params.withCredentials = true;
                }

                return params;
            }
function(params) {
                var accessToken = params.accessToken ? params.accessToken : this.driver.config
                    .get(corbel.Iam.IAM_TOKEN, {}).accessToken;

                if (accessToken && !params.headers.Authorization) {
                    params.headers.Authorization = 'Bearer ' + accessToken;
                    params.withCredentials = true;
                } else if (params.headers.Authorization) {
                    params.withCredentials = true;
                }

                return params;
            }
function ( params ) { var accessToken = params . accessToken ? params . accessToken : this . driver . config . get ( corbel . Iam . IAM_TOKEN , { } ) . accessToken ; if ( accessToken && ! params . headers . Authorization ) { params . headers . Authorization = 'Bearer ' + accessToken ; params . withCredentials = true ; } else if ( params . headers . Authorization ) { params . withCredentials = true ; } return params ; }
Add Authorization header with default tokenObject
@param {object} params request builded params
Add Authorization header with default tokenObject