auth

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthEngine

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

AuthEngine is responsible for user authentication operations.

func NewAuthEngine

func NewAuthEngine(DB db.DB, ScreatKeySize uint) *AuthEngine

func (*AuthEngine) GetCode

func (ae *AuthEngine) GetCode(username string) (code []byte, encryptedCode []byte, err error)

GetCode returns the screat code and encrypted screat code

func (*AuthEngine) RegisterUser

func (ae *AuthEngine) RegisterUser(username string, publicKey *rsa.PublicKey) error

RegisterUser registers a new user with a unique username and public key.

Jump to

Keyboard shortcuts

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