Safe Haskell | Safe-Inferred |
---|---|
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
Show PemFilePath Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types showsPrec :: Int -> PemFilePath -> ShowS # show :: PemFilePath -> String # showList :: [PemFilePath] -> ShowS # | |
Eq PemFilePath Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types (==) :: PemFilePath -> PemFilePath -> Bool # (/=) :: PemFilePath -> PemFilePath -> Bool # |
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
Show SetCookie | |
Default SetCookie |
|
Defined in Web.Cookie | |
NFData SetCookie | |
Defined in Web.Cookie | |
Eq SetCookie | |
newtype CookieDomain Source #
Examples:
"d123example.cl
oudfront.net"
"cloudfrontalia
s.example.com"
Instances
Show CookieDomain Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types showsPrec :: Int -> CookieDomain -> ShowS # show :: CookieDomain -> String # showList :: [CookieDomain] -> ShowS # | |
Eq CookieDomain Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types (==) :: CookieDomain -> CookieDomain -> Bool # (/=) :: CookieDomain -> CookieDomain -> Bool # |
newtype CookiePath Source #
Usually "/"
Instances
Show CookiePath Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types showsPrec :: Int -> CookiePath -> ShowS # show :: CookiePath -> String # showList :: [CookiePath] -> ShowS # | |
Eq CookiePath Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types (==) :: CookiePath -> CookiePath -> Bool # (/=) :: CookiePath -> CookiePath -> Bool # |
newtype PolicyCookie Source #
The value of a CloudFront-Policy
cookie.
Instances
Show PolicyCookie Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types showsPrec :: Int -> PolicyCookie -> ShowS # show :: PolicyCookie -> String # showList :: [PolicyCookie] -> ShowS # | |
Eq PolicyCookie Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types (==) :: PolicyCookie -> PolicyCookie -> Bool # (/=) :: PolicyCookie -> PolicyCookie -> Bool # |
newtype SignatureCookie Source #
The value of a CloudFront-Signature
cookie.
Instances
Show SignatureCookie Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types showsPrec :: Int -> SignatureCookie -> ShowS # show :: SignatureCookie -> String # showList :: [SignatureCookie] -> ShowS # | |
Eq SignatureCookie Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types (==) :: SignatureCookie -> SignatureCookie -> Bool # (/=) :: SignatureCookie -> SignatureCookie -> Bool # |
Time
data NominalDiffTime #
This is a length of time, as measured by UTC. It has a precision of 10^-12 s.
Conversion functions such as fromInteger
and realToFrac
will treat it as seconds.
For example, (0.010 :: NominalDiffTime)
corresponds to 10 milliseconds.
It has a precision of one picosecond (= 10^-12 s). Enumeration functions will treat it as picoseconds.
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 System.Posix.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
FromJSON Text | |
FromJSONKey Text | |
Defined in Data.Aeson.Types.FromJSON | |
ToJSON Text | |
Defined in Data.Aeson.Types.ToJSON | |
ToJSONKey Text | |
Defined in Data.Aeson.Types.ToJSON | |
Chunk Text | |
Defined in Data.Attoparsec.Internal.Types type ChunkElem Text pappendChunk :: State Text -> Text -> State Text atBufferEnd :: Text -> State Text -> Pos bufferElemAt :: Text -> Pos -> State Text -> Maybe (ChunkElem Text, Int) chunkElemToChar :: Text -> ChunkElem Text -> Char | |
Hashable Text | |
Defined in Data.Hashable.Class | |
Ixed Text | |
Defined in Control.Lens.At | |
AsJSON Text | |
AsNumber Text | |
AsValue Text | |
IsKey Text | |
type ChunkElem Text | |
Defined in Data.Attoparsec.Internal.Types | |
type State Text | |
Defined in Data.Attoparsec.Internal.Types type State Text = Buffer | |
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.