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.
Click to show internal directories.
Click to hide internal directories.