https://github.com/jessety/simple-hmac-auth-swift
Swift framework for interfacing with APIs that implement HMAC signatures
https://github.com/jessety/simple-hmac-auth-swift
api-security hmac-authentication ios request-signatures request-signing simple-hmac-auth swift
Last synced: 12 months ago
JSON representation
Swift framework for interfacing with APIs that implement HMAC signatures
- Host: GitHub
- URL: https://github.com/jessety/simple-hmac-auth-swift
- Owner: jessety
- License: mit
- Created: 2020-09-08T21:50:50.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-09-08T22:14:58.000Z (over 5 years ago)
- Last Synced: 2025-06-13T11:05:28.611Z (12 months ago)
- Topics: api-security, hmac-authentication, ios, request-signatures, request-signing, simple-hmac-auth, swift
- Language: Swift
- Homepage:
- Size: 20.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# simple-hmac-auth-swift
Swift framework for interfacing with APIs that implement [simple-hmac-auth](https://github.com/jessety/simple-hmac-auth).
[](https://github.com/jessety/simple-hmac-auth-swift/actions)
[](https://github.com/jessety/simple-hmac-auth-swift/blob/main/LICENSE)
## Usage
```swift
import SimpleHMACAuth
// Instantiate the class
let simpleHMAC = SimpleHMACAuth(apiKey: "API_KEY", secret: "SECRET")
// Create a request
let request = URLRequest(url: URL(string: "https://api.example.org/v1/items/")!)
// Sign the request
let signedRequest = try simpleHMAC.sign(request)
// Send the request
let task = session.dataTask(with: signedRequest) { (data, response, error) in
// ...
}
task.resume()
```
## License
MIT © Jesse Youngblood