sat

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2021 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const TypeAT string = "simple"

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	Pwd string `json:"pwd"`
}

func (*Request) ToSecretInfo added in v0.0.2

func (r *Request) ToSecretInfo() json.RawMessage

func (*Request) Type added in v0.0.4

func (r *Request) Type() string

type SimpleAuthenticationChecker

type SimpleAuthenticationChecker struct {
	storage.SaveProto

	Users map[string]User `json:"users,omitempty"`
}

func (*SimpleAuthenticationChecker) Check

func (sac *SimpleAuthenticationChecker) Check(
	ctx context.Context, userNameRequest string, secretInfo []byte,
) (ok bool, userName string, err *mft.Error)

func (*SimpleAuthenticationChecker) FromBytes

func (sac *SimpleAuthenticationChecker) FromBytes(data []byte) (err *mft.Error)

func (*SimpleAuthenticationChecker) Load added in v0.0.4

func (sac *SimpleAuthenticationChecker) Load() (err *mft.Error)

func (*SimpleAuthenticationChecker) Save added in v0.0.4

func (sac *SimpleAuthenticationChecker) Save() (err *mft.Error)

func (*SimpleAuthenticationChecker) ToBytes

func (sac *SimpleAuthenticationChecker) ToBytes() (data []byte, err *mft.Error)

func (*SimpleAuthenticationChecker) Type

func (sac *SimpleAuthenticationChecker) Type() string

type User

type User struct {
	Name       string `json:"name"`
	Pwd        string `json:"pwd,omitempty"`
	PwdIsEnc   bool   `json:"pwd_is_enc,omitempty"`
	IsDisabled bool   `json:"is_disabled,omitempty"`
}

func (*User) Check

func (u *User) Check(secretInfo []byte,
) (ok bool, userName string, err *mft.Error)

Jump to

Keyboard shortcuts

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