...

Package basic

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

Overview ▾

func AuthMiddleware

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

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

type AuthError

AuthError represents an authorization error.

type AuthError struct {
    Realm string
}

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.