httpauth

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package httpauth enforces credential transport rules for outbound API requests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Policy

type Policy struct{ AllowInsecure bool }

Policy controls whether credentials may be sent over plaintext HTTP. The default permits HTTPS and loopback HTTP, and rejects HTTPS downgrades.

func (Policy) Do

func (p Policy) Do(httpClient *http.Client, req *http.Request, user, password string) (*http.Response, error)

Do applies Basic authentication and enforces the policy on requests and redirects.

Jump to

Keyboard shortcuts

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