passkey

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWebAuthn

func NewWebAuthn(r *http.Request) (*webauthn.WebAuthn, error)

NewWebAuthn 根据 HTTP 请求动态创建 WebAuthn 实例

func ParseUserID

func ParseUserID(userHandle []byte) (uint, error)

ParseUserID 从 WebAuthnID 字节还原 user ID

Types

type User

type User struct {
	Inner    *biz.User
	Passkeys []*biz.UserPasskey
}

User 适配 webauthn.User 接口

func (*User) WebAuthnCredentials

func (u *User) WebAuthnCredentials() []webauthn.Credential

func (*User) WebAuthnDisplayName

func (u *User) WebAuthnDisplayName() string

func (*User) WebAuthnID

func (u *User) WebAuthnID() []byte

func (*User) WebAuthnName

func (u *User) WebAuthnName() string

Jump to

Keyboard shortcuts

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