Versions in this module Expand all Collapse all v1 v1.48.2 Nov 21, 2023 Changes in this version + const CookieKeyIDName + const CookiePolicyName + const CookieSignatureName + func CreateResource(scheme, u string) (string, error) + func LoadEncryptedPEMPrivKey(reader io.Reader, password []byte) (*rsa.PrivateKey, error) + func LoadPEMPrivKey(reader io.Reader) (*rsa.PrivateKey, error) + func LoadPEMPrivKeyFile(name string) (*rsa.PrivateKey, error) + type AWSEpochTime struct + func NewAWSEpochTime(t time.Time) *AWSEpochTime + func (t *AWSEpochTime) UnmarshalJSON(data []byte) error + func (t AWSEpochTime) MarshalJSON() ([]byte, error) + type Condition struct + DateGreaterThan *AWSEpochTime + DateLessThan *AWSEpochTime + IPAddress *IPAddress + type CookieOptions struct + Domain string + Path string + Secure bool + type CookieSigner struct + Opts CookieOptions + func NewCookieSigner(keyID string, privKey *rsa.PrivateKey, opts ...func(*CookieOptions)) *CookieSigner + func (s CookieSigner) Sign(u string, expires time.Time, opts ...func(*CookieOptions)) ([]*http.Cookie, error) + func (s CookieSigner) SignWithPolicy(p *Policy, opts ...func(*CookieOptions)) ([]*http.Cookie, error) + type IPAddress struct + SourceIP string + type Policy struct + Statements []Statement + func NewCannedPolicy(resource string, expires time.Time) *Policy + func (p *Policy) Sign(privKey *rsa.PrivateKey) (b64Signature, b64Policy []byte, err error) + func (p *Policy) Validate() error + type Statement struct + Condition Condition + Resource string + type URLSigner struct + func NewURLSigner(keyID string, privKey *rsa.PrivateKey) *URLSigner + func (s URLSigner) Sign(url string, expires time.Time) (string, error) + func (s URLSigner) SignWithPolicy(url string, p *Policy) (string, error)