View Source Macfly (macfly v0.2.19)

Macfly is a library for managing Fly macaroons.

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{})

View Source
@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{})

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

Decode a macaroon header into a list of Macaroon structs.

@spec default_options() :: Macfly.Options.t()
Link to this function

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

View Source
@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.

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

Encode a list of Macaroon structs into a macaroon header.