Go WSSE transport (http.RoundTripper)
import (
wsse "github.com/banovo/go-orocrm-wsse"
)
func main() {
req, err := http.NewRequest(http.MethodGet, url, nil)
t := wsse.NewTransport("my-user", "my-password-or-api-key")
resp, err := t.RoundTrip(req)
// do whatever you want
}
import (
wsse "github.com/banovo/go-orocrm-wsse"
)
func main() {
fmt.Println(wsse.CreateHeader("my-user", "my-password-or-api-key"))
}
This is an update of motemen's package. We avoid binary data and changed the date to ISO 8601. We do this because php and orocrm and the corresponding package and EscapeWSSEAuthenticationBundle seem to have problems with the orginal data.
Special thanks to @motemen and his wsse package we (needed) to fork from.