Skip to content

Latest commit

 

History

History
37 lines (21 loc) · 933 Bytes

README.md

File metadata and controls

37 lines (21 loc) · 933 Bytes

simple-hmac-auth-swift

Swift framework for interfacing with APIs that implement simple-hmac-auth.

ci license

Usage

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