biscuit-haskell-0.1.1.0: Library support for the Biscuit security token
Copyright© Clément Delafargue 2021
LicenseMIT
Maintainerclement@delafargue.name
Safe HaskellNone
LanguageHaskell2010

Auth.Biscuit.ProtoBufAdapter

Description

Conversion functions between biscuit components and protobuf-encoded components

Synopsis

Documentation

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 -> Int -> Block -> (Symbols, Block) Source #

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