zerodev-kora
Official Rust SDK for Kora. Blocking, built on ureq.
Validation
let kora = new.product.public_key;
let result = kora.validate?;
if !result.valid
With a public key set, an answer without a valid x-kora-signature returns Error::Signature. A rejected license is not an error: check valid and code.
Devices
let activated = kora.activate?;
let released = kora.deactivate?;
activate takes a free seat in each whitelist group of the product, then validates. deactivate frees it and returns success, code and removed.
Offline licenses
let file = admin.file?;
let license = kora.offline?;
offline checks the file against the public key with no network call and fails when the signature is wrong, the license expired or refresh_after has passed.
Licenses, products and customers
let admin = new.api_key;
let = admin.licenses.list?;
let license = admin.licenses.create?;
admin.licenses.update?;
admin.customers.update?;
admin.merge?;
Failed calls return Error::Status(status, message).