4 "git.curoverse.com/arvados.git/sdk/go/keepclient"
8 // SignLocator takes a blobLocator, an apiToken and an expiry time, and
9 // returns a signed locator string.
10 func SignLocator(blobLocator, apiToken string, expiry time.Time) string {
11 return keepclient.SignLocator(blobLocator, apiToken, expiry, theConfig.BlobSignatureTTL.Duration(), theConfig.blobSigningKey)
14 // VerifySignature returns nil if the signature on the signedLocator
15 // can be verified using the given apiToken. Otherwise it returns
16 // either ExpiredError (if the timestamp has expired, which is
17 // something the client could have figured out independently) or
19 func VerifySignature(signedLocator, apiToken string) error {
20 err := keepclient.VerifySignature(signedLocator, apiToken, theConfig.BlobSignatureTTL.Duration(), theConfig.blobSigningKey)
21 if err == keepclient.ErrSignatureExpired {
23 } else if err != nil {
24 return PermissionError