Invalid or malformed authorization header provided

I needed to specify a Custom Header (Authorization Basic) for this provider. I’ve base 64 encoded the client and secret to get it to work and it’s hard coded into the object, is it possible to pull the client id and secret from the settings and base64 encode it in ‘Custom Headers’?..