From 19f6782ef4a09195abf9c45acde992e5b3147853 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Sat, 16 Jan 2016 10:32:55 +0000 Subject: Deploy to GitHub Pages --- Crypto-Macaroon-Verifier.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Crypto-Macaroon-Verifier.html (limited to 'Crypto-Macaroon-Verifier.html') diff --git a/Crypto-Macaroon-Verifier.html b/Crypto-Macaroon-Verifier.html new file mode 100644 index 0000000..b58f97c --- /dev/null +++ b/Crypto-Macaroon-Verifier.html @@ -0,0 +1,13 @@ +Crypto.Macaroon.Verifier

hmacaroons-0.5.0.0: Haskell implementation of macaroons

Copyright(c) 2015 Julien Tanguy
LicenseBSD3
Maintainerjulien.tanguy@jhome.fr
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Crypto.Macaroon.Verifier

Description

 

Documentation

verify :: (Functor m, MonadIO m) => Secret -> [Caveat -> m VerifierResult] -> Macaroon -> m (Either ValidationError Macaroon)

Verify a Macaroon's signature and caveats, given the corresponding Secret + and verifiers.

A verifier is a function of type + MonadIO m => Caveat -> m VerifierResult.

It should return:

  • Unrelated if the caveat is not related to the verifier + (for instance a time verifier is given an action caveat);
  • Refused (ParseError reason) if the verifier is related to the + caveat, but failed to parse it completely;
  • Refused (ValidatorError reason) if the verifier is related to the + caveat, parsed it and invalidated it;
  • Verified if the verifier has successfully verified the + given caveat

data VerifierResult

Type representing the result of a validator

Constructors

Verified

The caveat is correctly parsed and verified

Refused ValidationError

The caveat is refused (Either a parse error or a validation error

Unrelated

The given verifier does not verify the caveat

data ValidationError

Type representing different validation errors. + Only ParseError and ValidatorError are exported, SigMismatch and + NoVerifier are used internally and should not be used by the user

Constructors

ParseError String

A verifier had a parse error

ValidatorError String

A verifier failed

Instances

Eq ValidationError 
Show ValidationError 
Monoid ValidationError

The Monoid instance is written so SigMismatch is an annihilator, + and NoVerifier is the identity element

\ No newline at end of file -- cgit v1.2.3