authservice

package
v0.0.0-...-e2c280a Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: LGPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Package authservice defines a Macaroon-based authentication service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKeyPair

func GetKeyPair(filename string) (*bakery.KeyPair, error)

GetKeyPair loads a key pair from a JSON file, or generate one if the filename is empty.

Types

type AuthService

type AuthService struct {
	httpservice.HTTPService

	KeyPair          *bakery.KeyPair
	Checker          credentials.Checker
	MacaroonValidity time.Duration
	// contains filtered or unexported fields
}

AuthService is an HTTP service for authentication using macaroons.

func NewAuthService

func NewAuthService(listenAddr string, logger *log.Logger, keyPair *bakery.KeyPair, macaroonValidity time.Duration) *AuthService

NewAuthService returns an AuthService.

Jump to

Keyboard shortcuts

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