plugin

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PasswordHasher

type PasswordHasher interface {

	// ID returns a string that uniquely identifies this plugin.
	ID() string

	// HashPassword returns a hashed value that can be (safely?) stored in a database
	HashPassword(plaintext string) (ciphertext string, error error)

	// CompareHashedValue checks that a plaintext value matches a stored ciphertext value.
	// OK returns TRUE if the values match.  Rehash returns TRUE if the hashing criteria has been updated
	// and a new hashed value should be stored in its place.
	CompareHashedPassword(plaintext string, ciphertext string) (OK bool, Rehash bool)
}

PasswordHasher handles all encryption functions for passwords.

type PasswordRule

type PasswordRule interface {

	// ID returns a string that uniquely identifies this plugin.
	ID() string

	// PasswordRuleDescription returns a map of language tags to human-readable strings that explain how the password can be used
	PasswordRuleDescription(language string) string

	// ValidatePassword returns TRUE if the password can be used in this system.  If not, it returns FALSE, and a message explaining why
	ValidatePassword(password string) (OK bool, errorMessage string)
}

PasswordRule is used to verify if a password meets the password complexity criteria for this system.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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