AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

CookieOptions

import "github.com/aws/aws-sdk-go/service/cloudfront/sign"

type CookieOptions struct { Path string Domain string Secure bool }

A CookieOptions optional additional options that can be applied to the signed cookies.

Path

Type: string

Domain

Type: string

Secure

Type: bool

Example

CookieOptions

{ privKey := mock.RSAPrivateKey cookieSigner := NewCookieSigner("keyID", privKey, func(o *CookieOptions) { o.Path = "/" o.Domain = ".cNameAssociatedWithMyDistribution.com" o.Secure = true }) cookies, err := cookieSigner.Sign("http*://*", testSignTime.Add(30*time.Minute), func(o *CookieOptions) { o.Path = "/mypath/" }) if err != nil { fmt.Println("failed to sign cookies with policy,", err) return } printExampleCookies(cookies) }

On this page: