barauth configuration looks fine to me.
we are able to download bar with similar configuration.
Please check whether the bar url is proper or not. just put in some browser and try to download the bar or use curl command.
Next, please check whether the user has the proper access. seems like this is the issue.