account

package
v0.0.0-...-8c4404e Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ArgonTime     = 1
	ArgonMemory   = 256 * 1024
	ArgonThreads  = 4
	ArgonKeySize  = 32
	ArgonSaltSize = 16

	ArgonMaxInstances = 16

	UUIDSize  = 16
	TokenSize = 32
)

Variables

This section is empty.

Functions

func ChangePW

func ChangePW(uuid []byte, password string) error

func Logout

func Logout(token []byte) error

/account/logout - log out of account

func Register

func Register(username, password string) error

/account/register - register account

Types

type GenericAuthResponse

type GenericAuthResponse struct {
	Token string `json:"token"`
}

type InfoResponse

type InfoResponse struct {
	Username        string `json:"username"`
	LastSessionSlot int    `json:"lastSessionSlot"`
}

func Info

func Info(username string, uuid []byte) (InfoResponse, error)

/account/info - get account info

type LoginResponse

type LoginResponse GenericAuthResponse

func Login

func Login(username, password string) (LoginResponse, error)

/account/login - log into account

Jump to

Keyboard shortcuts

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