users

package
v0.0.0-...-dae269f Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginOptions

type LoginOptions struct {
	Destination     string
	CreateIfMissing bool
	GrantAdminRole  bool
}

type PasswordValidator

type PasswordValidator struct {
	// contains filtered or unexported fields
}

func (PasswordValidator) Check

func (pv PasswordValidator) Check(ctx context.Context, password string) bool

func (PasswordValidator) CheckDictionary

func (pv PasswordValidator) CheckDictionary(ctx context.Context, writer io.Writer) error

func (PasswordValidator) Close

func (pv PasswordValidator) Close() error

type UserPolicy

type UserPolicy struct {
	ingredient.Base
}

func (*UserPolicy) Fetch

func (up *UserPolicy) Fetch(flags ingredient.FetcherFlags, target *status.WissKI) (err error)

type Users

type Users struct {
	ingredient.Base
	Dependencies struct {
		PHP *php.PHP
	}
}

func (*Users) All

func (u *Users) All(ctx context.Context, server *phpx.Server) (users []status.DrupalUser, err error)

All returns all known usernames

func (*Users) Fetch

func (u *Users) Fetch(flags ingredient.FetcherFlags, info *status.WissKI) (err error)

func (*Users) GetPasswordValidator

func (u *Users) GetPasswordValidator(ctx context.Context, username string) (pv PasswordValidator, err error)

func (*Users) Login

func (u *Users) Login(ctx context.Context, server *phpx.Server, username string) (dest *url.URL, err error)

Login generates a login link for the user with the given username

func (*Users) LoginWithOpt

func (u *Users) LoginWithOpt(ctx context.Context, server *phpx.Server, username string, opts LoginOptions) (dest *url.URL, err error)

LoginOrCreate generates a login link for the user with the given username and options

func (*Users) SetPassword

func (u *Users) SetPassword(ctx context.Context, server *phpx.Server, username, password string) error

SetPassword sets the password for a given user

Jump to

Keyboard shortcuts

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