@@ -12,14 +12,14 @@ module Auth.Biscuit
1212 -- * The biscuit auth token
1313 -- $biscuitOverview
1414
15- -- * Creating keypairs
15+ -- * Creating key pairs
1616 -- $keypairs
1717 newSecret
1818 , toPublic
1919 , SecretKey
2020 , PublicKey
2121
22- -- ** Parsing and serializing keypairs
22+ -- ** Parsing and serializing key pairs
2323 , serializeSecretKeyHex
2424 , serializePublicKeyHex
2525 , parseSecretKeyHex
@@ -158,7 +158,7 @@ import Auth.Biscuit.Token (AuthorizedBiscuit (..),
158158 queryAuthorizerFacts ,
159159 queryRawBiscuitFacts ,
160160 seal , serializeBiscuit )
161- import Auth.Biscuit.Utils (decodeHex , encodeHex' )
161+ import Auth.Biscuit.Utils (decodeHex , encodeHex' )
162162import qualified Data.Text as Text
163163
164164
@@ -178,12 +178,12 @@ import qualified Data.Text as Text
178178--
179179-- > -- Biscuit Open Verified means the token has valid signatures
180180-- > -- and is open to further restriction
181- -- > buildToken :: Keypair -> IO (Biscuit Open Verified)
182- -- > buildToken keypair =
181+ -- > buildToken :: SecretKey -> IO (Biscuit Open Verified)
182+ -- > buildToken secret =
183183-- > -- the logic language has its own syntax, which can be typed directly in haskell
184184-- > -- source code thanks to QuasiQuotes. The datalog snippets are parsed at compile
185185-- > -- time, so a datalog error results in a compilation error, not a runtime error
186- -- > mkBiscuit keypair [block|
186+ -- > mkBiscuit secret [block|
187187-- > // the two first lines describe facts:
188188-- > // the token holder is identified as `user_1234`
189189-- > user("user_1234");
@@ -256,8 +256,8 @@ fromHex = either (fail . Text.unpack) pure . decodeHex
256256-- Biscuits rely on public key cryptography: biscuits are signed with a secret key only known
257257-- to the party which emits it. Verifying a biscuit, on the other hand, can be done with a
258258-- public key that can be widely distributed. A private key and its corresponding public key
259- -- is called a keypair , but since a public key can be deterministically computed from a
260- -- private key, owning a private key is the same as owning a keypair .
259+ -- is called a key pair , but since a public key can be deterministically computed from a
260+ -- private key, owning a private key is the same as owning a key pair .
261261
262262-- | Generate a new random 'SecretKey'
263263newSecret :: IO SecretKey
@@ -398,11 +398,11 @@ applyThirdPartyBlockB64 b contentsB64 = do
398398-- they carry are not visible outside themselves, only their checks are evaluated.
399399--
400400-- Third-party blocks lift this limitation by carrying an extra signature, crafted with a
401- -- dedicated keypair . This way, the token authorizer (as well as blocks themselves) can
402- -- opt-in to trust facts coming from third-party blocks signed with specific keypairs .
401+ -- dedicated key pair . This way, the token authorizer (as well as blocks themselves) can
402+ -- opt-in to trust facts coming from third-party blocks signed with specific key pairs .
403403--
404404-- For instance, adding `check if group("admin") trusting {publicKey};` to a token will
405- -- make it usable only if it carries a third party-block signed by the corresponding keypair ,
405+ -- make it usable only if it carries a third party-block signed by the corresponding key pair ,
406406-- and carrying a `group("admin")` fact.
407407--
408408-- Since it is not desirable to share the token with the external entity providing the third-party
0 commit comments