audit

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2018 License: Apache-2.0 Imports: 15 Imported by: 5 modules, 9 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitTrailHandler

func InitTrailHandler(enabled bool, handlerURL string) error

func IsSamePassword

func IsSamePassword(hashedPassword []byte, password string) bool

func Trail

func Trail(entry Entry)

Types

type Entry

type Entry struct {
	Event         Event
	Admin         bool
	AuthID        string
	Data          map[string]interface{}
	RemoteAddr    string
	XForwardedFor string
	XRealIP       string
	Forwarded     string
}

func (Entry) WithRouterPayload

func (e Entry) WithRouterPayload(payload *router.Payload) Entry

type Event

type Event int
const (

	// EventLoginSuccess represents Login Success
	EventLoginSuccess Event

	// EventLoginFailure represents Login Failure
	EventLoginFailure

	// EventLogout represents Logout
	EventLogout

	// EventSignup represents Signup
	EventSignup

	// EventChangePassword represents Change Password
	EventChangePassword

	// EventChangeRoles represents Change Roles
	EventChangeRoles
)

func (Event) String

func (e Event) String() string

type PasswordChecker

type PasswordChecker struct {
	PwMinLength            int
	PwUppercaseRequired    bool
	PwLowercaseRequired    bool
	PwDigitRequired        bool
	PwSymbolRequired       bool
	PwMinGuessableLevel    int
	PwExcludedKeywords     []string
	PwExcludedFields       []string
	PwHistorySize          int
	PwHistoryDays          int
	PasswordHistoryEnabled bool
}

func (*PasswordChecker) ShouldSavePasswordHistory

func (pc *PasswordChecker) ShouldSavePasswordHistory() bool

func (*PasswordChecker) ValidatePassword

func (pc *PasswordChecker) ValidatePassword(payload ValidatePasswordPayload) skyerr.Error

type PwHousekeeper

type PwHousekeeper struct {
	AppName       string
	AccessControl string
	DBOpener      skydb.DBOpener
	DBImpl        string
	Option        string
	DBConfig      skydb.DBConfig

	PwHistorySize          int
	PwHistoryDays          int
	PasswordHistoryEnabled bool
}

func (*PwHousekeeper) Housekeep

func (p *PwHousekeeper) Housekeep(authID string)

type ValidatePasswordPayload

type ValidatePasswordPayload struct {
	AuthID        string
	PlainPassword string
	UserData      map[string]interface{}
	Conn          skydb.Conn
}

Jump to

Keyboard shortcuts

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