biscuit-haskell- Library support for the Biscuit security token
Copyright© Clément Delafargue 2021
Safe HaskellNone



Conversion functions between biscuit components and protobuf-encoded components



type Symbols = Map Int32 Text Source #

A map to get symbol names from symbol ids

extractSymbols :: Symbols -> [Block] -> Symbols Source #

Given existing symbols and a series of protobuf blocks, compute the complete symbol mapping

commonSymbols :: Symbols Source #

The common symbols defined in the biscuit spec

buildSymbolTable :: Symbols -> Block -> Symbols Source #

Given existing symbols and a biscuit block, compute the symbol table for the given block. Already existing symbols won't be included

pbToBlock :: Symbols -> Block -> Either String Block Source #

Parse a protobuf block into a proper biscuit block

blockToPb :: Symbols -> Block -> (Symbols, Block) Source #

Turn a biscuit block into a protobuf block, for serialization, along with the newly defined symbols

pbToSignedBlock :: SignedBlock -> Either String SignedBlock Source #

Parse a protobuf signed block into a signed biscuit block