Macfly (macfly v0.2.3)

Summary

Functions

Attenuate the permission tokens within the list of macaroons.

Decode a macaroon header into a list of Macaroon structs.

Get list of Discharge structs from list of macaroons for use in discharging third party caveats.

Encode a list of Macaroon structs into a macaroon header.

Functions

Link to this function

attenuate(macaroons, caveats, options \\ %Options{})

@spec attenuate([Macfly.Macaroon.t()], [Macfly.Caveat], Macfly.Options.t()) :: [
  Macfly.Macaroon.t()
]

Attenuate the permission tokens within the list of macaroons.

Link to this function

decode(header, o \\ %Options{})

@spec decode(String.t(), Macfly.Options.t()) ::
  {:ok, [Macfly.Macaroon.t()]} | {:error, any()}

Decode a macaroon header into a list of Macaroon structs.

Link to this function

discharges(macaroons, o \\ %Options{})

@spec discharges([Macfly.Macaroon.t()], Macfly.Options.t()) :: [Macfly.Discharge.t()]

Get list of Discharge structs from list of macaroons for use in discharging third party caveats.

Link to this function

encode(macaroons)

@spec encode([Macfly.Macaroon.t()]) :: String.t()

Encode a list of Macaroon structs into a macaroon header.