public string CreatePreAuthenticatedUrl(string urlString, DateTime? expiration = null)
 {
     // Path and query is part of verified url
     var url = new Uri(urlString);
     var verifiedUrlPart = url.PathAndQuery;
     var urlToken = new UrlToken() { Path = verifiedUrlPart, Expiration = expiration };
     var tokenParameter = this.cryptoSerializer.Serialize(urlToken);
     return AddQueryParameterString(urlString, "$token", tokenParameter);
 }
Beispiel #2
0
        public string CreatePreAuthenticatedUrl(string urlString, DateTime?expiration = null)
        {
            // Path and query is part of verified url
            var url             = new Uri(urlString);
            var verifiedUrlPart = url.PathAndQuery;
            var urlToken        = new UrlToken()
            {
                Path = verifiedUrlPart, Expiration = expiration
            };
            var tokenParameter = this.cryptoSerializer.Serialize(urlToken);

            return(AddQueryParameterString(urlString, "$token", tokenParameter));
        }