hibp

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPassword

func CheckPassword(userAgent string, password string, isTaken chan bool, httpClient *http.Client)

It is critical that this function is async as HIBP can take 1-2 seconds to respond. Run this at the beginning of login/registration and only listen for the result when required.

Types

type HIBPEnforcement

type HIBPEnforcement string
const (
	STRICT HIBPEnforcement = "strict"
	LOOSE  HIBPEnforcement = "loose"
)

type HIBPSettings

type HIBPSettings struct {
	Enabled                  bool
	AppName                  string
	Enforcement              HIBPEnforcement
	HTTPClient               *http.Client
	PasswordSecurityInfoLink string
}

Jump to

Keyboard shortcuts

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