Amazon.CloudFront.AmazonCloudFrontCookieSigner.GetCookiesForCustomPolicy C# (CSharp) Метод

GetCookiesForCustomPolicy() публичный статический Метод

Returns signed cookies that provides tailored access to private content based on an access time window and an ip range.
public static GetCookiesForCustomPolicy ( Protocols protocol, string distributionDomain, FileSystemInfo privateKey, string resourcePath, string keyPairId, System.DateTime expiresOn, System.DateTime activeFrom, string ipRange ) : CookiesForCustomPolicy
protocol Protocols The protocol used to access content using signed cookies.
distributionDomain string The domain name of the distribution.
privateKey System.IO.FileSystemInfo Your private key file. RSA private key (.pem) are supported.
resourcePath string The path for the resource.
keyPairId string The key pair id corresponding to the private key file given.
expiresOn System.DateTime The expiration date till which content can be accessed using the generated cookies.
activeFrom System.DateTime The date from which content can be accessed using the generated cookies.
ipRange string The allowed IP address range of the client making the GET request, in CIDR form (e.g. 192.168.0.1/24).
Результат CookiesForCustomPolicy
        public static CookiesForCustomPolicy GetCookiesForCustomPolicy(Protocols protocol,
                                                string distributionDomain,
                                                FileSystemInfo privateKey,
                                                string resourcePath,
                                                string keyPairId,
                                                DateTime expiresOn,
                                                DateTime activeFrom,
                                                string ipRange)
        {
            using (var reader = new StreamReader(File.OpenRead(privateKey.FullName)))
            {
                return GetCookiesForCustomPolicy(protocol, distributionDomain, reader, resourcePath, keyPairId, expiresOn, activeFrom, ipRange);
            }
        }

Same methods

AmazonCloudFrontCookieSigner::GetCookiesForCustomPolicy ( Protocols protocol, string distributionDomain, TextReader privateKey, string resourcePath, string keyPairId, System.DateTime expiresOn, System.DateTime activeFrom, string ipRange ) : CookiesForCustomPolicy
AmazonCloudFrontCookieSigner::GetCookiesForCustomPolicy ( Protocols protocol, string distributionDomain, TextReader privateKey, string resourcePath, string keyPairId, System.DateTime expiresOn, string ipRange ) : CookiesForCustomPolicy
AmazonCloudFrontCookieSigner::GetCookiesForCustomPolicy ( string resourceUrlOrPath, TextReader privateKey, string keyPairId, System.DateTime expiresOn, System.DateTime activeFrom, string ipRange ) : CookiesForCustomPolicy