password

package
v2.17.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Policies

type Policies struct {
	// contains filtered or unexported fields
}

Policies represents a password validation rules

func (Policies) Validate

func (s Policies) Validate(str string) error

Validate implements a password validation regarding the policy

type Validator

type Validator interface {
	Validate(str string) error
}

Validator describes the interface providing a password Validate method

func NewPasswordPolicy

func NewPasswordPolicy(minCharacters, minLowerCaseCharacters, minUpperCaseCharacters, minDigits, minSpecialCharacters int, bannedPasswordsList map[string]struct{}) Validator

NewPasswordPolicy returns a new NewPasswordPolicy instance

Jump to

Keyboard shortcuts

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