authenticate

package
v0.0.0-...-21813c2 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrChallengeIdNotFound = errors.New("challenge id not found")

Functions

func ApplyRoutes

func ApplyRoutes(r *gin.RouterGroup)

ApplyRoutes applies router to gin Router

func CheckSignAptos

func CheckSignAptos(signature string, challangeId string, message string, pubKey string) (string, bool, error)

func CheckSignEthereum

func CheckSignEthereum(signature string, flowId string, message string) (string, bool, error)

func CheckSignSolana

func CheckSignSolana(signature string, challangeId string, message string, pubKey string) (string, bool, error)

func CheckSignSui

func CheckSignSui(signature string, challangeId string) (string, bool, error)

Types

type AuthenticatePayload

type AuthenticatePayload struct {
	Status  int64  `json:"status"`
	Success bool   `json:"success"`
	Message string `json:"message"`
	Token   string `json:"token"`
}

func ErrAuthenticate

func ErrAuthenticate(errvalue string) AuthenticatePayload

type AuthenticateRequest

type AuthenticateRequest struct {
	ChallengeId string `json:"challengeId" binding:"required"`
	Signature   string `json:"signature" binding:"required"`
	PubKey      string `json:"pubKey" binding:"omitempty"`
	ChainName   string `json:"chainName" binding:"required"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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