Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data HeaderArtifacts
- haHash :: HeaderArtifacts -> Maybe ByteString
- haExt :: HeaderArtifacts -> Maybe ExtData
- haApp :: HeaderArtifacts -> Maybe Text
- haDlg :: HeaderArtifacts -> Maybe Text
- type ExtData = ByteString
- data PayloadInfo = PayloadInfo {}
- type ContentType = ByteString
- type ClientId = Text
- newtype Key = Key ByteString
- data HawkAlgo = (HawkAlgoCls alg, Show alg) => HawkAlgo alg
- class HawkAlgoCls a where
- newtype Key = Key ByteString
- data SHA1 :: * = SHA1
- data SHA256 :: * = SHA256
- readHawkAlgo :: String -> Maybe HawkAlgo
- data WwwAuthenticateHeader = WwwAuthenticateHeader {}
- data ServerAuthorizationHeader = ServerAuthorizationHeader {
- sahMac :: ByteString
- sahHash :: Maybe ByteString
- sahExt :: Maybe ExtData
- data MessageAuth = MessageAuth {}
Artifacts
data HeaderArtifacts Source #
Struct for attributes which will be encoded in the Hawk
Authorization
header and included in the verification. The
terminology (and spelling) come from the original Javascript
implementation of Hawk.
haHash :: HeaderArtifacts -> Maybe ByteString Source #
Payload hash.
type ExtData = ByteString Source #
Extension data included in verification hash. This can be anything or nothing, depending on what the application needs.
data PayloadInfo Source #
Payload data and content type bundled up for convenience.
type ContentType = ByteString Source #
Value of Content-Type
HTTP headers.
Credentials
Identifies a particular client so that their credentials can be looked up.
A user-supplied password or generated key.
A wrapper data type representing one of the supported HMAC
algorithms. Use HawkAlgo SHA1
or HawkAlgo SHA256
.
(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.
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.
A user-supplied password or generated key.
SHA1 cryptographic hash algorithm
SHA256 cryptographic hash algorithm
readHawkAlgo :: String -> Maybe HawkAlgo Source #
Inverse of show
, for parsing "algorithm"
fields in JSON
structures.
Headers
data WwwAuthenticateHeader Source #
Represents the WWW-Authenticate
header which the server uses to
respond when the client isn't authenticated.
WwwAuthenticateHeader | |
|
data ServerAuthorizationHeader Source #
Represents the Server-Authorization
header which the server
sends back to the client.
ServerAuthorizationHeader | |
|
data MessageAuth Source #
Authorization attributes for a Hawk message. This is generated by
message
and verified by
authenticateMessage
.
MessageAuth | |
|