account

package
v0.0.0-...-0e0a3b7 Latest Latest
Warning

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

Go to latest
Published: May 14, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountStore

type AccountStore interface {
	Get(string) *User
	Create(string) *User
	Save(*User) error
}

type ChallengeProvider

type ChallengeProvider interface {
	DeriveKey(string, []byte) []byte
	RandomSalt() []byte
	Challenge(message []byte, key []byte) []byte
}

type FilesystemStore

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

func NewFilesystemStore

func NewFilesystemStore(path string, challengeProvider ChallengeProvider) *FilesystemStore

func (*FilesystemStore) Create

func (f *FilesystemStore) Create(name string) *User

func (*FilesystemStore) Get

func (f *FilesystemStore) Get(name string) *User

func (*FilesystemStore) Save

func (f *FilesystemStore) Save(user *User) error

type User

type User struct {
	Name   string
	Values map[string]interface{}
	// contains filtered or unexported fields
}

func (*User) Check

func (u *User) Check(password string) bool

func (*User) Save

func (u *User) Save() error

func (*User) UpdateChallenge

func (u *User) UpdateChallenge(password string)

Jump to

Keyboard shortcuts

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