Add proc for minting test capabilities
This commit is contained in:
parent
9c2f58ad39
commit
a8030cce4d
|
@ -15,6 +15,11 @@ proc mint*[T](key: openarray[byte]; oid: T): SturdyRef =
|
|||
let oidPr = toPreserve(oid, Ref)
|
||||
SturdyRef(oid: oidPr, sig: hmacSha256(key, encode(oidPr), key.len))
|
||||
|
||||
proc mint*(): SturdyRef {.deprecated.} =
|
||||
## Mint a test capability for the use with the Syndicate server.
|
||||
var key: array[16, byte]
|
||||
mint(key, "syndicate")
|
||||
|
||||
proc attenuate*(r: SturdyRef; caveats: Attenuation): SturdyRef =
|
||||
result = SturdyRef(
|
||||
oid: r.oid,
|
||||
|
|
Loading…
Reference in New Issue