lock

package
v0.0.0-...-5ddf3d3 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package lock implements user locking after N bad sign-in attempts.

Index

Constants

View Source
const (
	StoreAttemptNumber = "attempt_number"
	StoreAttemptTime   = "attempt_time"
	StoreLocked        = "locked"
)

Storage key constants

Variables

This section is empty.

Functions

This section is empty.

Types

type Lock

type Lock struct {
	*authboss.Authboss
}

Lock module

func (*Lock) Initialize

func (l *Lock) Initialize(ab *authboss.Authboss) error

Initialize the module

func (*Lock) Lock

func (l *Lock) Lock(key string) error

Lock a user manually.

func (*Lock) Routes

func (l *Lock) Routes() authboss.RouteTable

Routes for the module

func (*Lock) Storage

func (l *Lock) Storage() authboss.StorageOptions

Storage requirements

func (*Lock) Unlock

func (l *Lock) Unlock(key string) error

Unlock a user that was locked by this module.

Jump to

Keyboard shortcuts

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