Scripting proxy settings

Valued Contributor II

I'm trying to setup a script to input the proxy settings onto machines and I'm having some trouble with one final setting of "Proxy server requires a password" checkbox.

According to what I've found online relating to it, we've tried to follow this example

To set a HTTP proxy of “” on port “8888” on the Wi-Fi interface, along with authentication of “darren” with the password “123” you would use (this is all on one line):

networksetup –setwebproxy "Wi-Fi" "" "8888" "on" "darren" "123"

We've got it setting up to the port fine, but the: on, Darren, 123 portion is not getting set. We've tried quoted, un-quoted, variable, adding the term 'authenticated', etc to no avail...

Any thoughts on how the proper syntax for authenticated?