Versions in this module Expand all Collapse all v1 v1.0.1 Nov 21, 2023 v1.0.0 Nov 6, 2023 Changes in this version + const C_Store_Sys + const C_Store_User + const C_Url_host + const C_date_time + var DBPath = flag.String("dbpath", "./selfweb3.db", "--dbPath=./selfweb3.db") + var UserGetFromStore func(key string, ptrObject any) error + var UserSaveToStore func(key string, val any) error + var WebauthnGetFromStore func(key, decryptKey string, ptrObject any) error + var WebauthnSaveToStore func(key, encryptKey string, val any) error + func FatalCheck(err error) + func InitWebAuthn(rpOrigin string) error + func NewWebauthnUser(name string, displayName string) *webauthnUser + func RouterHook(router *httprouter.Router, method string, path string, ...) + func RouterInit(router *httprouter.Router) + func Run(ctx context.Context, fs *embed.FS) + func SendEmailToUser(title, email, content string) error + func Str(data any) string + func UserAfterWebAuthnLogin() + func UserAuthVerify(w http.ResponseWriter, r *http.Request) + func UserBindWallet(oldWallet, newWallet string) error + func UserLoadWeb2Data(userID, webPublic, params string) (any, error) + func UserSessionCheck(w http.ResponseWriter, r *http.Request) bool + func UserStoreWeb2Data(userID, recoverID, encryptWeb2Data string) error + func UserVerify(w http.ResponseWriter, r *http.Request) bool + func WauthnBeginLogin(username, webAuthnKey string) (interface{}, error, string) + func WauthnBeginRegister(username string) (interface{}, error, string) + func WauthnClean(username string) + func WauthnFinishLogin(username string, bufReader io.Reader) (interface{}, error, string) + func WauthnFinishRegister(username, webAuthnKey string, bufReader io.Reader) (*webauthnUser, error, string) + func WebAuthnBeginLogin(w http.ResponseWriter, r *http.Request) + func WebAuthnBeginRegister(w http.ResponseWriter, r *http.Request) + func WebAuthnFinishLogin(w http.ResponseWriter, r *http.Request) + func WebAuthnFinishRegister(w http.ResponseWriter, r *http.Request) + type Meta struct + EncryptedPrivateKey string + type User struct + RecoverID []byte + Web2Key []byte + Web2Nonce int64 + WebauthnUser []byte + func CreateUser(userID string) (*User, error) + func GetUser(username string) *User + type Worker struct + WebPublic *ecdsa.PublicKey + func (p *Worker) Init() + func (p *Worker) UnInit()