macaroon

package
v0.0.0-...-dda4347 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2025 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const MacaroonURI = "github.com/juju/juju"

MacaroonURI is use when register new Juju checkers with the bakery.

Variables

View Source
var DefaultExpiration = 24 * time.Hour

DefaultExpiration is a sensible default duration for root keys before expiration.

View Source
var MacaroonNamespace = checkers.NewNamespace(map[string]string{MacaroonURI: ""})

MacaroonNamespace is the namespace Juju uses for managing macaroons.

Functions

This section is empty.

Types

type ExpirableStorage

type ExpirableStorage interface {
	bakery.RootKeyStore

	// ExpireAfter returns a new ExpirableStorage that will expire
	// added items after the specified duration.
	ExpireAfter(time.Duration) ExpirableStorage
}

ExpirableStorage extends bakery.Storage with the ExpireAfter method, to expire data added at the specified time.

func NewExpirableStorage

func NewExpirableStorage(backing dbrootkeystore.ContextBacking, expireAfter time.Duration, clock dbrootkeystore.Clock) ExpirableStorage

NewExpirableStorage returns an implementation of bakery.Storage that stores all items in DQLite with an expiry time.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL