hsoz-0.0.0.2: Iron, Hawk, Oz: Web auth protocols

Safe HaskellNone
LanguageHaskell2010

Network.Hawk.Types

Synopsis

Documentation

type ClientId = Text Source #

Identifies a particular client so that their credentials can be looked up.

newtype Key Source #

A user-supplied password or generated key.

Constructors

Key ByteString 

Instances

Show Key Source # 

Methods

showsPrec :: Int -> Key -> ShowS #

show :: Key -> String #

showList :: [Key] -> ShowS #

IsString Key Source # 

Methods

fromString :: String -> Key #

Generic Key Source # 

Associated Types

type Rep Key :: * -> * #

Methods

from :: Key -> Rep Key x #

to :: Rep Key x -> Key #

ByteArrayAccess Key Source # 

Methods

length :: Key -> Int #

withByteArray :: Key -> (Ptr p -> IO a) -> IO a #

type Rep Key Source # 
type Rep Key = D1 (MetaData "Key" "Network.Hawk.Algo" "hsoz-0.0.0.2-3Cllcgcqvn288lQBqaARRr" True) (C1 (MetaCons "Key" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ByteString)))

type ContentType = ByteString Source #

Value of Content-Type HTTP headers.

data PayloadInfo Source #

Payload data and content type bundled up for convenience.

data HawkAlgo Source #

A wrapper data type representing one of the supported HMAC algorithms. Use HawkAlgo SHA1 or HawkAlgo SHA256.

Constructors

(HawkAlgoCls alg, Show alg) => HawkAlgo alg 

class HawkAlgoCls a where Source #

The class of HMAC algorithms supported by the Hawk protocol. Users of the Hawk module probably won't directly need this.

Minimal complete definition

hawkHash, hawkMac

Methods

hawkHash :: a -> ByteString -> ByteString Source #

Calculates the hash of a message. The result is encoded in Base64.

hawkMac :: a -> Key -> ByteString -> ByteString Source #

Calculates the hash-based MAC of a message. The result is encoded in Base64.

newtype Key Source #

A user-supplied password or generated key.

Constructors

Key ByteString 

Instances

Show Key Source # 

Methods

showsPrec :: Int -> Key -> ShowS #

show :: Key -> String #

showList :: [Key] -> ShowS #

IsString Key Source # 

Methods

fromString :: String -> Key #

Generic Key Source # 

Associated Types

type Rep Key :: * -> * #

Methods

from :: Key -> Rep Key x #

to :: Rep Key x -> Key #

ByteArrayAccess Key Source # 

Methods

length :: Key -> Int #

withByteArray :: Key -> (Ptr p -> IO a) -> IO a #

type Rep Key Source # 
type Rep Key = D1 (MetaData "Key" "Network.Hawk.Algo" "hsoz-0.0.0.2-3Cllcgcqvn288lQBqaARRr" True) (C1 (MetaCons "Key" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ByteString)))

readHawkAlgo :: String -> Maybe HawkAlgo Source #

Inverse of show, for parsing "algorithm" fields in JSON structures.