Safe Haskell | None |
---|---|
Language | Haskell2010 |
Network.AWS.CloudFront.SignedCookies.Types
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.
Constructors
Policy | |
Fields
|
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"
Constructors
PemFilePath Text |
Instances
Eq PemFilePath Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types | |
Show PemFilePath Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types Methods 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"
Constructors
CookieDomain Text |
Instances
Eq CookieDomain Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types | |
Show CookieDomain Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types Methods showsPrec :: Int -> CookieDomain -> ShowS # show :: CookieDomain -> String # showList :: [CookieDomain] -> ShowS # |
newtype CookiePath Source #
Usually "/"
Constructors
CookiePath Text |
Instances
Eq CookiePath Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types | |
Show CookiePath Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types Methods showsPrec :: Int -> CookiePath -> ShowS # show :: CookiePath -> String # showList :: [CookiePath] -> ShowS # |
newtype PolicyCookie Source #
The value of a CloudFront-Policy
cookie.
Constructors
PolicyCookie Text |
Instances
Eq PolicyCookie Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types | |
Show PolicyCookie Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types Methods showsPrec :: Int -> PolicyCookie -> ShowS # show :: PolicyCookie -> String # showList :: [PolicyCookie] -> ShowS # |
newtype SignatureCookie Source #
The value of a CloudFront-Signature
cookie.
Constructors
SignatureCookie Text |
Instances
Eq SignatureCookie Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types Methods (==) :: SignatureCookie -> SignatureCookie -> Bool # (/=) :: SignatureCookie -> SignatureCookie -> Bool # | |
Show SignatureCookie Source # | |
Defined in Network.AWS.CloudFront.SignedCookies.Types Methods 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
.
How long from now the credentials expire
Constructors
Lifespan NominalDiffTime |
The time at which credentials begin to take effect
Constructors
StartImmediately | |
StartTime POSIXTime |
IP address
The IP address or address range of clients allowed to make requests
Strings
A space efficient, packed, unboxed Unicode text type.
Instances
Chunk Text | |
Defined in Data.Attoparsec.Internal.Types | |
Hashable Text | |
Defined in Data.Hashable.Class | |
Ixed Text | |
Defined in Control.Lens.At | |
AsNumber Text | |
AsPrimitive Text | |
AsValue Text | |
AsJSON Text | |
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.
Instances
Eq PrivateKey | |
Defined in Crypto.PubKey.RSA.Types | |
Data PrivateKey | |
Defined in Crypto.PubKey.RSA.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PrivateKey -> c PrivateKey # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PrivateKey # toConstr :: PrivateKey -> Constr # dataTypeOf :: PrivateKey -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PrivateKey) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PrivateKey) # gmapT :: (forall b. Data b => b -> b) -> PrivateKey -> PrivateKey # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PrivateKey -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PrivateKey -> r # gmapQ :: (forall d. Data d => d -> u) -> PrivateKey -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> PrivateKey -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PrivateKey -> m PrivateKey # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PrivateKey -> m PrivateKey # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PrivateKey -> m PrivateKey # | |
Read PrivateKey | |
Defined in Crypto.PubKey.RSA.Types Methods readsPrec :: Int -> ReadS PrivateKey # readList :: ReadS [PrivateKey] # readPrec :: ReadPrec PrivateKey # readListPrec :: ReadPrec [PrivateKey] # | |
Show PrivateKey | |
Defined in Crypto.PubKey.RSA.Types Methods showsPrec :: Int -> PrivateKey -> ShowS # show :: PrivateKey -> String # showList :: [PrivateKey] -> ShowS # | |
NFData PrivateKey | |
Defined in Crypto.PubKey.RSA.Types Methods rnf :: PrivateKey -> () # |