auth

package
v0.0.0-...-9a83fbb Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAuth

func AddAuth(builder *server.ServerBuiler)

AddAuth 添加权限

func NewCurrentUserInfo

func NewCurrentUserInfo(user *identity2.User) *ginx.CurrentUserInfo

Types

type JWTOptions

type JWTOptions struct {
	Key   string
	Realm string
}

type LoginInput

type LoginInput struct {
	Address    string                       `json:"address" binding:"required"`
	Sig        string                       `json:"sig" binding:"required"`
	WalletType identity2.WalletType         `json:"walletType"`
	Platform   *identity2.LinkPlatformInput `json:"platform"`
}

type LoginResult

type LoginResult struct {
	Code        int       `json:"code"`
	JwtToken    string    `json:"jwtToken"`
	Expire      time.Time `json:"expire"`
	DisplayName string    `json:"displayName"`
	Avatar      string    `json:"avatar"`
	Address     string    `json:"address"`
}

type LogoutResult

type LogoutResult struct {
	Code    int  `json:"code"`
	Success bool `json:"success"`
}

type SignMessageInput

type SignMessageInput struct {
	Address  string            `json:"address" binding:"required"`
	SignType identity.SignType `json:"signType" binding:"required"`
}

type SingMessageOutput

type SingMessageOutput struct {
	Message string `json:"message"`
}

type VerifySignMessageInput

type VerifySignMessageInput struct {
	Address string `json:"address" binding:"required"`
	Sign    string `json:"sign" binding:"required"`
}

Jump to

Keyboard shortcuts

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