Back to godoc.org
github.com/elazarl/goproxy/ext/auth

package auth

v0.0.0 (49ad98f)
Latest Go to latest
Published: Apr 26, 2020 | License: BSD-3-Clause | Module: github.com/elazarl/goproxy/ext

Index

func Basic

func Basic(realm string, f func(user, passwd string) bool) goproxy.ReqHandler

Basic returns a basic HTTP authentication handler for requests

You probably want to use auth.ProxyBasic(proxy) to enable authentication for all proxy activities

func BasicConnect

func BasicConnect(realm string, f func(user, passwd string) bool) goproxy.HttpsHandler

BasicConnect returns a basic HTTP authentication handler for CONNECT requests

You probably want to use auth.ProxyBasic(proxy) to enable authentication for all proxy activities

func BasicUnauthorized

func BasicUnauthorized(req *http.Request, realm string) *http.Response

func ProxyBasic

func ProxyBasic(proxy *goproxy.ProxyHttpServer, realm string, f func(user, passwd string) bool)

ProxyBasic will force HTTP authentication before any request to the proxy is processed

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier