authadm

package module
v0.0.0-...-3b296fc Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: MIT Imports: 33 Imported by: 0

README

auth-adm

Authentication Administrator for Ecletus

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(ctx *core.Context, userId string, Claims *claims.Claims) (err error)

Types

type AuthAdmLoginDayRule

type AuthAdmLoginDayRule struct {
	aorm.AuditedModel

	Enabled,
	Sun, Mon, Tue, Wed,
	Thu, Fri, Sat bool

	ProtectorID string `sql:"size:24;index"`

	Times []AuthAdmTimeRange `sql:"foreignkey:RuleID"`
}

func (AuthAdmLoginDayRule) AcceptWeekday

func (this AuthAdmLoginDayRule) AcceptWeekday(day ...time.Weekday) bool

func (AuthAdmLoginDayRule) String

func (this AuthAdmLoginDayRule) String() string

type AuthAdmLoginIpRule

type AuthAdmLoginIpRule struct {
	aorm.AuditedModel

	ProtectorID bid.BID `sql:"index"`

	Enabled bool
	Ip      iputils.IPRange
}

func (AuthAdmLoginIpRule) BeforeSave

func (this AuthAdmLoginIpRule) BeforeSave() (err error)

func (AuthAdmLoginIpRule) String

func (this AuthAdmLoginIpRule) String() string

type AuthAdmMail

type AuthAdmMail struct {
	aorm.AuditedModel

	Address string

	AutoUpdaterID string `sql:"size:24;index"`
}

type AuthAdmPasswordsAutoUpdater

type AuthAdmPasswordsAutoUpdater struct {
	aorm.AuditedSDModel
	fragment.FragmentedModel

	Name, Description string

	Enabled bool

	Sun, Mon, Tue, Wed,
	Thu, Fri, Sat bool

	Users        []AuthAdmUserPasswordsAutoUpdater `sql:"foreignkey:AutoUpdaterID"`
	Notificators []AuthAdmMail                     `sql:"foreignkey:AutoUpdaterID"`
}

func (AuthAdmPasswordsAutoUpdater) Days

func (this AuthAdmPasswordsAutoUpdater) Days() (days []time.Weekday)

type AuthAdmProtector

type AuthAdmProtector struct {
	aorm.AuditedSDModel
	fragment.FragmentedModel

	Name, Description string

	Enabled    bool
	AutoLogout bool
	IpRules    []AuthAdmLoginIpRule   `sql:"foreignkey:ProtectorID"`
	DayRules   []AuthAdmLoginDayRule  `sql:"foreignkey:ProtectorID"`
	Users      []AuthAdmUserProtector `sql:"foreignkey:ProtectorID"`
}

func (AuthAdmProtector) GetAormInlinePreloadFields

func (AuthAdmProtector) GetAormInlinePreloadFields() []string

func (AuthAdmProtector) String

func (p AuthAdmProtector) String() (s string)

type AuthAdmTimeRange

type AuthAdmTimeRange struct {
	aorm.BIDSerial

	From, To string

	RuleID string `sql:"size:24;index"`
}

func (AuthAdmTimeRange) StringT

func (this AuthAdmTimeRange) StringT(now time.Time) string

func (AuthAdmTimeRange) Times

func (this AuthAdmTimeRange) Times(now time.Time) (From, To time.Time)

func (AuthAdmTimeRange) Validate

func (this AuthAdmTimeRange) Validate(db *aorm.DB)

type AuthAdmUserPasswordsAutoUpdater

type AuthAdmUserPasswordsAutoUpdater struct {
	fragment.FragmentModel

	AutoUpdaterID bid.BID `sql:"index"`
	AutoUpdater   *AuthAdmPasswordsAutoUpdater

	User *user.User `sql:"foreignkey:ID"`
}

func (AuthAdmUserPasswordsAutoUpdater) GetAormInlinePreloadFields

func (AuthAdmUserPasswordsAutoUpdater) GetAormInlinePreloadFields(scope *aorm.Scope) []string

func (AuthAdmUserPasswordsAutoUpdater) String

type AuthAdmUserProtector

type AuthAdmUserProtector struct {
	fragment.FragmentModel

	ProtectorID bid.BID `sql:"index"`
	Protector   *AuthAdmProtector

	User *user.User `sql:"foreignkey:ID"`
}

func (AuthAdmUserProtector) GetAormInlinePreloadFields

func (AuthAdmUserProtector) GetAormInlinePreloadFields(scope *aorm.Scope) []string

func (AuthAdmUserProtector) String

func (p AuthAdmUserProtector) String() string

type NewUserPassword

type NewUserPassword struct {
	Name, Email, Password string
}

type PasswordUpdater

type PasswordUpdater struct {
	SitesRegister *core.SitesRegister
	Translator    *i18nmod.Translator
	Auth          *auth.Auth
	// contains filtered or unexported fields
}

func (PasswordUpdater) Update

func (this PasswordUpdater) Update()

type Plugin

type Plugin struct {
	plug.EventDispatcher
	db.DBNames
	admin_plugin.AdminNames

	CronKey,
	AuthKey,
	LogoutersKey,
	SitesRegisterKey,
	TranslatorKey,
	MailerKey string
	// contains filtered or unexported fields
}

func (*Plugin) Init

func (p *Plugin) Init(options *plug.Options)

func (*Plugin) OnRegister

func (p *Plugin) OnRegister(options *plug.Options)

func (*Plugin) RequireOptions

func (p *Plugin) RequireOptions() []string

Jump to

Keyboard shortcuts

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