auth

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SampleUsername = "sampleUser"
	SamplePassword = "samplePassword"
)

WARNING! JUST A SHOWCASE ---------------------------------

Variables

View Source
var SamplePasswordHash = []byte("$2a$10$A3090fBqvJ3SPg0VGf2afePobWmEAQZ0VbTzbnVLNVCe5blymBham")

Functions

func Checksum

func Checksum(pw string) [32]byte

func Client

func Client(username, pw string) orbit.AuthFunc

func PasswordHash

func PasswordHash(pw string) ([]byte, error)

func Server

func Server(hook GetHashHook) orbit.AuthFunc

Types

type GetHashHook

type GetHashHook func(username string) (hash []byte, ok bool)

type HashedCredentials

type HashedCredentials map[string][]byte

Jump to

Keyboard shortcuts

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