auth

package
v0.0.0-...-9c9dde5 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const KeyLen = 24

Variables

This section is empty.

Functions

func IsKeyValid

func IsKeyValid(key string) bool

func Middleware

func Middleware(conf *config.Config) func(http.Handler) http.Handler

Types

type AuthContext

type AuthContext struct {
	Username        string
	AllowedNetworks []net.IPNet
}

func ForContext

func ForContext(ctx context.Context) *AuthContext

type AuthError

type AuthError struct {
	Error  string `json:"error"`
	Reason string `json:"reason"`
}

Jump to

Keyboard shortcuts

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