local

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareHashAndPassword

func CompareHashAndPassword(e string, p string) (bool, error)

CompareHashAndPassword ..

func NewProvider

func NewProvider(opts ...Option) auth.Provider

NewProvider creates a new local authentication provider.

Types

type Option

type Option func(*Provider)

func Email

func Email(email string) Option

func Name

func Name(name string) Option

func Password

func Password(password string) Option

func User

func User(user string) Option

type Provider

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

Provider a local authentication provider. TODO: support configuration later

func (*Provider) Authenticate

func (p *Provider) Authenticate(loginUser, password string) (*auth.ExternalAccount, error)

Authenticate ..

Jump to

Keyboard shortcuts

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