https://github.com/myra-security-gmbh/signature
Golang package for generating/adding the required authentication information to a MYRA API call.
https://github.com/myra-security-gmbh/signature
api go golang myra myracloud
Last synced: 9 months ago
JSON representation
Golang package for generating/adding the required authentication information to a MYRA API call.
- Host: GitHub
- URL: https://github.com/myra-security-gmbh/signature
- Owner: Myra-Security-GmbH
- License: mit
- Created: 2018-11-09T09:59:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-04-03T06:43:43.000Z (about 2 years ago)
- Last Synced: 2024-06-21T19:55:32.077Z (almost 2 years ago)
- Topics: api, go, golang, myra, myracloud
- Language: Go
- Size: 14.6 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Signature
Golang package for generating/adding the required authentication information to a MYRA API call.
[](https://goreportcard.com/report/github.com/Myra-Security-GmbH/signature)
[](http://opensource.org/licenses/MIT)
[](https://pkg.go.dev/github.com/Myra-Security-GmbH/signature)
[](https://github.com/Myra-Security-GmbH/signature/actions/workflows/test.yml)
### Usage
```
// Create a new Signature instance using your API credentials provided by Myra Security GmbH and the prepared request
s := signature.New(secret, apiKey, request)
// Append signature to the request and return prepared request
req, err := s.Append()
...`
// OR - return the signature string for own interaction:
t := time.Now().Format(time.RFC3339)
signature, err := s.Signature(t)
...
// OR - just generate and return the SigningString (required for the signature):
signingString := signature.SigningString("content data", "GET", "/en/rapi/...", t)
...
```