auth

package
v0.0.0-...-fe9eb67 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2015 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SessionKeys db.Bucket = "auth-session-keys"
	Users       db.Bucket = "auth-users"
)

Variables

This section is empty.

Functions

func Buckets

func Buckets() []db.Bucket

func CreateUser

func CreateUser(d db.DB, email, pwhash string) error

func DeleteUser

func DeleteUser(d db.DB, email string) error

func GetTimeout

func GetTimeout() time.Duration

func LoginUser

func LoginUser(d db.DB, email, pwhash string) (util.Key, error)

func LogoutUser

func LogoutUser(d db.DB, email string, key util.Key) error

func SetTimeout

func SetTimeout(t time.Duration)

func Valid

func Valid(d db.DB, email string, key util.Key) error

Types

type Login

type Login struct {
	Key     util.Key  `json:"key,omitempty"`
	Timeout time.Time `json:"timeout,omitempty"`
}

type User

type User struct {
	Email string    `json:"email,omitempty"`
	Salt  util.Salt `json:"salt,omitempty"`
	Hash  util.Hash `json:"hash,omitempty"`
	Key   util.Key  `json:"key,omitempty"`
}

Jump to

Keyboard shortcuts

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