events

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2018 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountCreated      string = "account_created"
	AccountActivated    string = "account_activated"
	AccountNotActivated string = "account_not_activated"
	AccountLocked       string = "account_locked"
	AccountUnlocked     string = "account_unlocked"
	AccountNotUnlocked  string = "account_not_unlocked"
	AccountEnabled      string = "account_enabled"
	AccountDisabled     string = "account_disabled"
	AccountNotEnabled   string = "account_not_enabled"
	AccountDeleted      string = "account_deleted"
	PasswordUpdate      string = "password_update"
	PasswordResetReq    string = "password_reset_request"
)

Account Events

View Source
const (
	SecondFactorTotpAdded          string = "totp_added"
	SecondFactorTotpUsed           string = "totp_used"
	SecondFactorTotpRemoved        string = "totp_removed"
	SecondFactorU2FAdded           string = "u2f_added"
	SecondFactorU2FUsed            string = "u2f_used"
	SecondFactorU2FRemoved         string = "u2f_removed"
	SecondFactorBackupCodesAdded   string = "backup_code_added"
	SecondFactorBackupCodesUsed    string = "backup_code_used"
	SecondFactorBackupCodesRemoved string = "backup_code_removed"
)

2FA Events

View Source
const (
	LoginSuccess          string = "login_success"
	LoginFailure          string = "login_failure"
	AccountLoginNewDevice string = "login_new_device"
	Logout                string = "logout"
)

Login Events

View Source
const (
	OAuthClientCreated      string = "oauth_client_created"
	OAuthClientRemoved      string = "oauth_client_removed"
	OAuthClientAuthorized   string = "oauth_client_authorized"
	OAuthClientDeauthorized string = "oauth_client_deauthorized"
)

OAuth Events

Variables

This section is empty.

Functions

func NewData

func NewData() map[string]string

NewData creates a new blank data object

Types

type AuthPlzEvent

type AuthPlzEvent struct {
	UserExtID string
	Time      time.Time
	Type      string
	Data      map[string]string
}

AuthPlzEvent event type for asynchronous communication

func NewEvent

func NewEvent(userExtID, eventType string, data map[string]string) *AuthPlzEvent

NewEvent Create a new AuthPlz event

func (*AuthPlzEvent) GetData

func (e *AuthPlzEvent) GetData() map[string]string

GetData fetches data associated with the event

func (*AuthPlzEvent) GetTime

func (e *AuthPlzEvent) GetTime() time.Time

GetTime fetches the event originator time

func (*AuthPlzEvent) GetType

func (e *AuthPlzEvent) GetType() string

GetType fetches the event type

func (*AuthPlzEvent) GetUserExtID

func (e *AuthPlzEvent) GetUserExtID() string

GetUserExtID fetches the associated external user id

type Emitter

type Emitter interface {
	SendEvent(interface{})
}

Emitter interface for event producers

type EventType

type EventType string

EventType wraps strings for type safety

Jump to

Keyboard shortcuts

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