]> git.immae.eu Git - github/fretlink/hmacaroons.git/commitdiff
Modify exports & haddock
authorJulien Tanguy <julien.tanguy@jhome.fr>
Mon, 17 Aug 2015 17:39:05 +0000 (19:39 +0200)
committerJulien Tanguy <julien.tanguy@jhome.fr>
Mon, 17 Aug 2015 17:39:05 +0000 (19:39 +0200)
src/Crypto/Macaroon.hs
src/Crypto/Macaroon/Verifier/Internal.hs

index c9c8c21807eacb0b3a28ce2203950f41cf141012..86d8eb7b9f062db0d57874d48b2fdf871f25894b 100644 (file)
@@ -43,16 +43,20 @@ module Crypto.Macaroon (
     , inspect
     , addFirstPartyCaveat
     -- , addThirdPartyCaveat
+    -- * Serialize
+    , module Crypto.Macaroon.Serializer.Base64
+    -- * Verify
+    , module Crypto.Macaroon.Verifier
     ) where
 
 -- import           Crypto.Cipher.AES
 import           Crypto.Hash
 import           Data.Byteable
-import qualified Data.ByteString            as BS
-import qualified Data.ByteString.Base64.URL as B64
-import qualified Data.ByteString.Char8      as B8
+import qualified Data.ByteString                   as BS
 
 import           Crypto.Macaroon.Internal
+import           Crypto.Macaroon.Serializer.Base64
+import           Crypto.Macaroon.Verifier
 
 -- | Create a Macaroon from its key, identifier and location
 create :: Secret -> Key -> Location -> Macaroon
@@ -78,5 +82,3 @@ addFirstPartyCaveat ident m = addCaveat (location m) ident BS.empty m
 -- addThirdPartyCaveat key cid loc m = addCaveat loc cid vid m
 --   where
 --     vid = encryptECB (initAES (signature m)) key
-
-
index 5126b2ebb3a4664028a5b38c2e9b0d00557bd99a..b3ad7f2c569d11d11ac99d459e0e8175515f64f9 100644 (file)
@@ -30,16 +30,16 @@ import           Data.Monoid
 import           Crypto.Macaroon.Internal
 
 -- | 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
+-- Only 'ParseError' and 'ValidatorError' are exported, @SigMismatch@ and
+-- @NoVerifier@ are used internally and should not be used by the user
 data ValidationError = SigMismatch -- ^ Signatures do not match
                      | NoVerifier -- ^ No verifier can handle a given caveat
                      | ParseError String -- ^ A verifier had a parse error
                      | ValidatorError String -- ^ A verifier failed
                      deriving (Show,Eq)
 
--- | The 'Monoid' instance is written so 'SigMismatch' is an annihilator,
--- and 'NoVerifier' is the identity element
+-- | The 'Monoid' instance is written so @SigMismatch@ is an annihilator,
+-- and @NoVerifier@ is the identity element
 instance Monoid ValidationError where
     mempty = NoVerifier
     NoVerifier `mappend` e = e