Reputation: 1531
I'm trying to check on the expiration date of the SAS key on the client side so that I can request a new SAS key once it expires. I'm using the Microsoft.WindowsAzure.Storage
namespace (which is version 2.0 of the azure storage library). Is there a built in method for this or will I have to parse it manually?
Upvotes: 4
Views: 2690
Reputation: 11008
David's answer is correct for the question about how to parse the expiry time (+1). But ultimately you should not be doing this. There are two better options:
Upvotes: 2
Reputation: 71101
I don't believe there's anything specific in the storage client library. You should be able to parse the querystring on the URI and look at the UTC date in signedexpiry
. You can parse the querystring with HttpUtility.ParseQueryString()
.
Here are two caveats to think about:
signedexpiry
will be part of the querystring. More on shared access policies here.Upvotes: 3