package basic

import "github.com/go-kit/kit/auth/basic"

Index

Functions

func AuthMiddleware

func AuthMiddleware(requiredUser, requiredPassword, realm string) endpoint.Middleware

AuthMiddleware returns a Basic Authentication middleware for a particular user and password.

Types

type AuthError

type AuthError struct {
	Realm string
}

AuthError represents an authorization error.

func (AuthError) Error

func (AuthError) Error() string

Error is an implementation of the Error interface.

func (AuthError) Headers

func (e AuthError) Headers() http.Header

Headers is an implementation of the Headerer interface in go-kit/http.

func (AuthError) StatusCode

func (AuthError) StatusCode() int

StatusCode is an implementation of the StatusCoder interface in go-kit/http.

Source Files

middleware.go

Version
v0.13.0 (latest)
Published
May 29, 2023
Platform
linux/amd64
Imports
10 packages
Last checked
5 hours ago

Tools for package owners.