audit

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

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