version1

package
v0.0.0-...-7356fde Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const (
	PasswordSignin    = "signin"
	PasswordChanged   = "password changed"
	PasswordRecovered = "password recovered"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IPasswordsClientV1

type IPasswordsClientV1 interface {
	GetPasswordInfo(correlationId string,
		userId string) (result *UserPasswordInfoV1, err error)

	SetTempPassword(correlationId string,
		userId string) (password string, err error)

	SetPassword(correlationId string, userId string, password string) error

	DeletePassword(correlationId string, userId string) error

	Authenticate(correlationId string, userId string,
		password string) (authenticated bool, err error)

	ChangePassword(correlationId string, userId string,
		oldPassword string, newPassword string) error

	ValidateCode(correlationId string, userId string,
		code string) (valid bool, err error)

	ResetPassword(correlationId string, userId string,
		code string, password string) error

	RecoverPassword(correlationId string, userId string) error
}

type PasswordGrpcClientV1

type PasswordGrpcClientV1 struct {
	clients.GrpcClient
}

func NewPasswordGrpcClientV1

func NewPasswordGrpcClientV1() *PasswordGrpcClientV1

func (*PasswordGrpcClientV1) Authenticate

func (c *PasswordGrpcClientV1) Authenticate(correlationId string,
	userId string, password string) (authenticated bool, err error)

func (*PasswordGrpcClientV1) ChangePassword

func (c *PasswordGrpcClientV1) ChangePassword(correlationId string,
	userId string, oldPassword string, newPassword string) error

func (*PasswordGrpcClientV1) DeletePassword

func (c *PasswordGrpcClientV1) DeletePassword(correlationId string,
	userId string) error

func (*PasswordGrpcClientV1) GetPasswordInfo

func (c *PasswordGrpcClientV1) GetPasswordInfo(correlationId string,
	userId string) (result *UserPasswordInfoV1, err error)

func (*PasswordGrpcClientV1) RecoverPassword

func (c *PasswordGrpcClientV1) RecoverPassword(correlationId string,
	userId string) error

func (*PasswordGrpcClientV1) ResetPassword

func (c *PasswordGrpcClientV1) ResetPassword(correlationId string,
	userId string, code string, password string) error

func (*PasswordGrpcClientV1) SetPassword

func (c *PasswordGrpcClientV1) SetPassword(correlationId string,
	userId string, password string) error

func (*PasswordGrpcClientV1) SetTempPassword

func (c *PasswordGrpcClientV1) SetTempPassword(correlationId string,
	userId string) (password string, err error)

func (*PasswordGrpcClientV1) ValidateCode

func (c *PasswordGrpcClientV1) ValidateCode(correlationId string,
	userId string, code string) (valid bool, err error)

type PasswordsHttpCommandableClientV1

type PasswordsHttpCommandableClientV1 struct {
	*cclients.CommandableHttpClient
	// contains filtered or unexported fields
}

func NewPasswordsHttpCommandableClientV1

func NewPasswordsHttpCommandableClientV1() *PasswordsHttpCommandableClientV1

func (*PasswordsHttpCommandableClientV1) Authenticate

func (c *PasswordsHttpCommandableClientV1) Authenticate(correlationId string, userId string,
	password string) (authenticated bool, err error)

func (*PasswordsHttpCommandableClientV1) ChangePassword

func (c *PasswordsHttpCommandableClientV1) ChangePassword(correlationId string, userId string,
	oldPassword string, newPassword string) error

func (*PasswordsHttpCommandableClientV1) DeletePassword

func (c *PasswordsHttpCommandableClientV1) DeletePassword(correlationId string, userId string) error

func (*PasswordsHttpCommandableClientV1) GetPasswordInfo

func (c *PasswordsHttpCommandableClientV1) GetPasswordInfo(correlationId string,
	userId string) (result *UserPasswordInfoV1, err error)

func (*PasswordsHttpCommandableClientV1) RecoverPassword

func (c *PasswordsHttpCommandableClientV1) RecoverPassword(correlationId string, userId string) error

func (*PasswordsHttpCommandableClientV1) ResetPassword

func (c *PasswordsHttpCommandableClientV1) ResetPassword(correlationId string, userId string,
	code string, password string) error

func (*PasswordsHttpCommandableClientV1) SetPassword

func (c *PasswordsHttpCommandableClientV1) SetPassword(correlationId string, userId string, password string) error

func (*PasswordsHttpCommandableClientV1) SetTempPassword

func (c *PasswordsHttpCommandableClientV1) SetTempPassword(correlationId string,
	userId string) (password string, err error)

func (*PasswordsHttpCommandableClientV1) ValidateCode

func (c *PasswordsHttpCommandableClientV1) ValidateCode(correlationId string, userId string,
	code string) (valid bool, err error)

type PasswordsMemoryClientV1

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

func NewPasswordsMemoryClientV1

func NewPasswordsMemoryClientV1() *PasswordsMemoryClientV1

func (*PasswordsMemoryClientV1) Authenticate

func (c *PasswordsMemoryClientV1) Authenticate(correlationId string, userId string, password string) (authenticated bool, err error)

func (*PasswordsMemoryClientV1) ChangePassword

func (c *PasswordsMemoryClientV1) ChangePassword(correlationId string, userId string,
	oldPassword string, newPassword string) error

func (*PasswordsMemoryClientV1) DeletePassword

func (c *PasswordsMemoryClientV1) DeletePassword(correlationId string, userId string) error

func (*PasswordsMemoryClientV1) GetPasswordInfo

func (c *PasswordsMemoryClientV1) GetPasswordInfo(correlationId string, userId string) (result *UserPasswordInfoV1, err error)

func (*PasswordsMemoryClientV1) RecoverPassword

func (c *PasswordsMemoryClientV1) RecoverPassword(correlationId string, userId string) error

func (*PasswordsMemoryClientV1) ResetPassword

func (c *PasswordsMemoryClientV1) ResetPassword(correlationId string, userId string, code string, password string) error

func (*PasswordsMemoryClientV1) SetPassword

func (c *PasswordsMemoryClientV1) SetPassword(correlationId string, userId string, password string) error

func (*PasswordsMemoryClientV1) SetTempPassword

func (c *PasswordsMemoryClientV1) SetTempPassword(correlationId string, userId string) (password string, err error)

func (*PasswordsMemoryClientV1) ValidateCode

func (c *PasswordsMemoryClientV1) ValidateCode(correlationId string, userId string,
	code string) (valid bool, err error)

type UserPasswordInfoV1

type UserPasswordInfoV1 struct {
	Id         string    `json:"id"`
	ChangeTime time.Time `json:"changed_time"`
	Locked     bool      `json:"locked"`
	LockTime   time.Time `json:"lock_time"`
}

func EmptyUserPasswordInfoV1

func EmptyUserPasswordInfoV1() *UserPasswordInfoV1

func NewUserPasswordInfoV1

func NewUserPasswordInfoV1(id string, changeTime time.Time,
	locked bool, lockTime time.Time) *UserPasswordInfoV1

type UserPasswordV1

type UserPasswordV1 struct {
	/* Identification */
	Id       string `json:"id"`
	Password string `json:"password"`

	/* Password management */
	ChangeTime    time.Time `json:"changed_time"`
	Locked        bool      `json:"locked"`
	LockTime      time.Time `json:"lock_time"`
	FailCount     int32     `json:"fail_count"`
	FailTime      time.Time `json:"fail_time"`
	RecCode       string    `json:"rec_code"`
	RecExpireTime time.Time `json:"rec_expire_time"`

	/* Custom fields */
	CustomHdr interface{} `json:"custom_hdr"`
	CustomDat interface{} `json:"custom_dat"`
}

func EmptyUserPasswordV1

func EmptyUserPasswordV1() *UserPasswordV1

func NewUserPasswordV1

func NewUserPasswordV1(id string, password string) *UserPasswordV1

Jump to

Keyboard shortcuts

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