How can I parse the expiration date from a Windows Azure SAS key as a client? -
i'm trying check on expiration date of sas key on client side can request new sas key once expires. i'm using microsoft.windowsazure.storage
namespace (which version 2.0 of azure storage library). there built in method or have parse manually?
i don't believe there's specific in storage client library. should able parse querystring on uri , @ utc date in signedexpiry
. can parse querystring httputility.parsequerystring()
.
here 2 caveats think about:
- this check won't entirely accurate, since there clock-drift between machine's clock , storage service's clock.
- if server uses shared access policy (which allows programmatic modification/revocation of access), there's no guarantee
signedexpiry
part of querystring. more on shared access policies here.
Comments
Post a Comment