Added permission helper functions.
authorTim Pierce <twp@curoverse.com>
Fri, 2 May 2014 19:05:07 +0000 (15:05 -0400)
committerTim Pierce <twp@curoverse.com>
Fri, 2 May 2014 19:05:07 +0000 (15:05 -0400)
commit8023ae393e2c9ce115bf67bbcf632798a3d17b87
tree372644f378eaa834d620b539b56da69248247d77
parent7ce745d5645dc49c2833c1c617fd488bf3a62307
Added permission helper functions.

GeneratePerms returns a string representing the signed permission hint
for the blob identified by blob_hash, api_token and timestamp.

SignLocator takes a blob_locator, an api_token and a timestamp, and
returns a signed locator string.

VerifySignature returns true if the signature on the signed_locator can
be verified using the given api_token.

Refs #2328.
services/keep/src/keep/perms.go [new file with mode: 0644]
services/keep/src/keep/perms_test.go [new file with mode: 0644]