Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Policy = Policy {}
- newtype Resource = Resource Text
- newtype PemFilePath = PemFilePath Text
- newtype KeyPairId = KeyPairId Text
- type CookiesText = [(Text, Text)]
- data SetCookie
- newtype CookieDomain = CookieDomain Text
- newtype CookiePath = CookiePath Text
- newtype PolicyCookie = PolicyCookie Text
- newtype SignatureCookie = SignatureCookie Text
- data NominalDiffTime
- type POSIXTime = NominalDiffTime
- newtype Lifespan = Lifespan NominalDiffTime
- data StartTime
- newtype EndTime = EndTime POSIXTime
- data IpAddress
- data Text
- data ByteString
- data PrivateKey
Policy
A policy specifies what resource is being granted, for what time period, and to what IP addresses.
For AWS's documentation on what going into a CloudFront policy statement, see Values That You Specify in the Policy Statement for a Custom Policy for Signed Cookies.
Policy | |
|
URL that a policy will grant access to, optionally containing asterisks for wildcards.
Examples:
"https:/
/d123example.cloudfront.net/index.html"
"https:/
/d123example.cloudfront.net/*.jpeg"
Crypto
newtype PemFilePath Source #
Location in the filesystem where a .pem file containing an RSA secret key can be found.
The filename downloaded from AWS looks like this:
"pk-APKAIATX
N3RCIOVT5WRQ.pem"
Instances
Eq PemFilePath Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types (==) :: PemFilePath -> PemFilePath -> Bool # (/=) :: PemFilePath -> PemFilePath -> Bool # | |
Show PemFilePath Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types showsPrec :: Int -> PemFilePath -> ShowS # show :: PemFilePath -> String # showList :: [PemFilePath] -> ShowS # |
CloudFront key pair ID for the key pair that you are using to generate signature.
The key pair ID can be found in the name of key files that you download, and looks like this:
APKAIATXN3
RCIOVT5WRQ
Cookies
type CookiesText = [(Text, Text)] #
Textual cookies. Functions assume UTF8 encoding.
Data type representing the key-value pair to use for a cookie, as well as configuration options for it.
Creating a SetCookie
SetCookie
does not export a constructor; instead, use defaultSetCookie
and override values (see http://www.yesodweb.com/book/settings-types for details):
import Web.Cookie :set -XOverloadedStrings let cookie =defaultSetCookie
{setCookieName
= "cookieName",setCookieValue
= "cookieValue" }
Cookie Configuration
Cookies have several configuration options; a brief summary of each option is given below. For more information, see RFC 6265 or Wikipedia.
Instances
Eq SetCookie | |
Show SetCookie | |
NFData SetCookie | |
Defined in Web.Cookie | |
Default SetCookie |
|
Defined in Web.Cookie |
newtype CookieDomain Source #
Examples:
"d123example.cl
oudfront.net"
"cloudfrontalia
s.example.com"
Instances
Eq CookieDomain Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types (==) :: CookieDomain -> CookieDomain -> Bool # (/=) :: CookieDomain -> CookieDomain -> Bool # | |
Show CookieDomain Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types showsPrec :: Int -> CookieDomain -> ShowS # show :: CookieDomain -> String # showList :: [CookieDomain] -> ShowS # |
newtype CookiePath Source #
Usually "/"
Instances
Eq CookiePath Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types (==) :: CookiePath -> CookiePath -> Bool # (/=) :: CookiePath -> CookiePath -> Bool # | |
Show CookiePath Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types showsPrec :: Int -> CookiePath -> ShowS # show :: CookiePath -> String # showList :: [CookiePath] -> ShowS # |
newtype PolicyCookie Source #
The value of a CloudFront-Policy
cookie.
Instances
Eq PolicyCookie Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types (==) :: PolicyCookie -> PolicyCookie -> Bool # (/=) :: PolicyCookie -> PolicyCookie -> Bool # | |
Show PolicyCookie Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types showsPrec :: Int -> PolicyCookie -> ShowS # show :: PolicyCookie -> String # showList :: [PolicyCookie] -> ShowS # |
newtype SignatureCookie Source #
The value of a CloudFront-Signature
cookie.
Instances
Eq SignatureCookie Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types (==) :: SignatureCookie -> SignatureCookie -> Bool # (/=) :: SignatureCookie -> SignatureCookie -> Bool # | |
Show SignatureCookie Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types showsPrec :: Int -> SignatureCookie -> ShowS # show :: SignatureCookie -> String # showList :: [SignatureCookie] -> ShowS # |
Time
data NominalDiffTime #
This is a length of time, as measured by UTC. Conversion functions will treat it as seconds. It has a precision of 10^-12 s. It ignores leap-seconds, so it's not necessarily a fixed amount of clock time. For instance, 23:00 UTC + 2 hours of NominalDiffTime = 01:00 UTC (+ 1 day), regardless of whether a leap-second intervened.
Instances
type POSIXTime = NominalDiffTime #
POSIX time is the nominal time since 1970-01-01 00:00 UTC
To convert from a CTime
or EpochTime
, use realToFrac
.
The time at which credentials begin to take effect
IP address
The IP address or address range of clients allowed to make requests
Strings
A space efficient, packed, unboxed Unicode text type.
Instances
Hashable Text | |
Defined in Data.Hashable.Class | |
ToJSON Text | |
Defined in Data.Aeson.Types.ToJSON | |
KeyValue Object | Constructs a singleton |
KeyValue Pair | |
ToJSONKey Text | |
Defined in Data.Aeson.Types.ToJSON | |
FromJSON Text | |
FromJSONKey Text | |
Defined in Data.Aeson.Types.FromJSON | |
Chunk Text | |
Defined in Data.Attoparsec.Internal.Types | |
Ixed Text | |
Defined in Control.Lens.At | |
AsNumber Text | |
AsPrimitive Text | |
AsValue Text | |
AsJSON Text | |
FromPairs Value (DList Pair) | |
Defined in Data.Aeson.Types.ToJSON | |
v ~ Value => KeyValuePair v (DList Pair) | |
Defined in Data.Aeson.Types.ToJSON | |
type State Text | |
Defined in Data.Attoparsec.Internal.Types | |
type ChunkElem Text | |
Defined in Data.Attoparsec.Internal.Types | |
type Item Text | |
type Index Text | |
Defined in Control.Lens.At | |
type IxValue Text | |
Defined in Control.Lens.At |
data ByteString #
A space-efficient representation of a Word8
vector, supporting many
efficient operations.
A ByteString
contains 8-bit bytes, or by using the operations from
Data.ByteString.Char8 it can be interpreted as containing 8-bit
characters.
Instances
Crypto
data PrivateKey #
Represent a RSA private key.
Only the pub, d fields are mandatory to fill.
p, q, dP, dQ, qinv are by-product during RSA generation, but are useful to record here to speed up massively the decrypt and sign operation.
implementations can leave optional fields to 0.