verify

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package verify is for verifying the credentials of a user are valid.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound        = errors.New("could not find entry for given user")
	ErrHashDoesntMatch = errors.New("hashed password is not hash of the given password")
)

Functions

This section is empty.

Types

type PostgresVerifier

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

func NewPostgresVerifier

func NewPostgresVerifier(opt *pg.Options) *PostgresVerifier

func (*PostgresVerifier) Verify

func (p *PostgresVerifier) Verify(user string, pw string) (bool, error)

type SimpleVerifier

type SimpleVerifier struct {
}

func (*SimpleVerifier) Verify

func (s *SimpleVerifier) Verify(_ string, _ string) (bool, error)

type Verifier

type Verifier interface {
	Verify(user string, pw string) (bool, error)
}

Jump to

Keyboard shortcuts

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