users

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION      = "v1"
	PUBLIC_GROUP = "auth"
)
View Source
const DEFAULT_LIFETIME = 730 * time.Hour

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthTextResult

type AuthTextResult struct {
	Text       string     `json:"text"`
	SignInData SignInBody `json:"data"`
}

type SignInBody

type SignInBody struct {
	Address   string        `json:"address"`
	Nonce     string        `json:"nonce"`
	Lifetime  time.Duration `json:"lifetime"`
	Signature string        `json:"signature"`
	Text      string        `json:"text"`
}

type SignInResult

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

type User

type User struct {
	Nonce   string         `json:"nonce"`
	Address common.Address `json:"address"`
}

type UserApi

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

func NewUserAPI

func NewUserAPI(maker *jwtmaker.JWTMaker, cache cache.ICache, resolver resolver.IResolver, repository repository.UserRepository) UserApi

func (UserApi) GetAuthText

func (a UserApi) GetAuthText(c echo.Context) error

func (UserApi) Register

func (a UserApi) Register(g *echo.Group)

func (UserApi) SignIn

func (a UserApi) SignIn(c echo.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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