function addAuthenticationToAxios(axiosConfig) {
    if (!axiosConfig || !axiosConfig.url || !SecurityUtils.isAuthenticationActivated()) {
        return axiosConfig;
    }
    switch (SecurityUtils.getAuthenticationMethod(axiosConfig.url)) {
        case 'authkey':
            const token = SecurityUtils.getToken();
            if (!token) {
                return axiosConfig;
            }
            addParameterToAxiosConfig(axiosConfig, 'authkey', token);
            return axiosConfig;
        case 'basic':
            const basicAuthHeader = SecurityUtils.getBasicAuthHeader();
            if (!basicAuthHeader) {
                return axiosConfig;
            }
            addHeaderToAxiosConfig(axiosConfig, 'Authorization', basicAuthHeader);
            return axiosConfig;
        default:
            // we cannot handle the required authentication method
            return axiosConfig;
    }
}
/**
 * Internal helper that will add to the axios config object the correct
 * authentication method based on the request URL.
 */
Internal helper that will add to the axios config object the correct
authentication method based on the request URL.
Internal helper that will add to the axios config object the correct authentication method based on the request URL .
function addAuthenticationToAxios(axiosConfig) {
    if (!axiosConfig || !axiosConfig.url || !SecurityUtils.isAuthenticationActivated()) {
        return axiosConfig;
    }
    switch (SecurityUtils.getAuthenticationMethod(axiosConfig.url)) {
        case 'authkey':
            const token = SecurityUtils.getToken();
            if (!token) {
                return axiosConfig;
            }
            addParameterToAxiosConfig(axiosConfig, 'authkey', token);
            return axiosConfig;
        case 'basic':
            const basicAuthHeader = SecurityUtils.getBasicAuthHeader();
            if (!basicAuthHeader) {
                return axiosConfig;
            }
            addHeaderToAxiosConfig(axiosConfig, 'Authorization', basicAuthHeader);
            return axiosConfig;
        default:
            return axiosConfig;
    }
}
function addAuthenticationToAxios ( axiosConfig ) { if ( ! axiosConfig || ! axiosConfig . url || ! SecurityUtils . isAuthenticationActivated ( ) ) { return axiosConfig ; } switch ( SecurityUtils . getAuthenticationMethod ( axiosConfig . url ) ) { case 'authkey' : const token = SecurityUtils . getToken ( ) ; if ( ! token ) { return axiosConfig ; } addParameterToAxiosConfig ( axiosConfig , 'authkey' , token ) ; return axiosConfig ; case 'basic' : const basicAuthHeader = SecurityUtils . getBasicAuthHeader ( ) ; if ( ! basicAuthHeader ) { return axiosConfig ; } addHeaderToAxiosConfig ( axiosConfig , 'Authorization' , basicAuthHeader ) ; return axiosConfig ; default : return axiosConfig ; } }
Internal helper that will add to the axios config object the correct
 authentication method based on the request URL.
Internal helper that will add to the axios config object the correct authentication method based on the request URL .
// we cannot handle the required authentication method