https://github.com/banovo/go-orocrm-wsse
Go WSSE transport (http.RoundTripper)
https://github.com/banovo/go-orocrm-wsse
golang orocrm wsse
Last synced: 5 months ago
JSON representation
Go WSSE transport (http.RoundTripper)
- Host: GitHub
- URL: https://github.com/banovo/go-orocrm-wsse
- Owner: banovo
- License: mit
- Fork: true (motemen/go-wsse)
- Created: 2016-10-18T08:50:48.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-03T10:34:51.000Z (over 9 years ago)
- Last Synced: 2024-06-20T14:19:04.307Z (almost 2 years ago)
- Topics: golang, orocrm, wsse
- Language: Go
- Homepage: https://banovo.atlassian.net/wiki/x/H4BoC
- Size: 9.77 KB
- Stars: 0
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-orocrm-wsse [](https://godoc.org/github.com/banovo/go-orocrm-wsse) [](https://travis-ci.org/banovo/go-orocrm-wsse) [](https://goreportcard.com/report/github.com/banovo/go-orocrm-wsse) [](LICENSE.md) [](https://codeclimate.com/github/banovo/go-orocrm-wsse)
Go WSSE transport (http.RoundTripper)
## Usage
### As RoundTripper
```go
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
}
```
### X-WSSE Header string only
```go
import (
wsse "github.com/banovo/go-orocrm-wsse"
)
func main() {
fmt.Println(wsse.CreateHeader("my-user", "my-password-or-api-key"))
}
```
## Difference to the forked package
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](https://www.orocrm.com/documentation/index/current/cookbook/how-to-use-wsse-authentication) and the corresponding package and [EscapeWSSEAuthenticationBundle](https://github.com/djoos/EscapeWSSEAuthenticationBundle) seem to have problems with the orginal data.
## Thanks
Special thanks to [@motemen](https://github.com/motemen) and his [wsse package](https://github.com/motemen/go-wsse) we (needed) to fork from.