passkey

package
v0.2.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildWebAuthn

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

BuildWebAuthn constructs a WebAuthn instance using one current Passkey settings snapshot and the request context.

func BuildWebAuthnWithSettings

func BuildWebAuthnWithSettings(r *http.Request, settings *system_setting.PasskeySettings) (*webauthn.WebAuthn, error)

BuildWebAuthnWithSettings constructs a WebAuthn instance from one caller supplied settings snapshot. Request handlers use it after checking Enabled so a hot configuration update cannot mix the enablement decision with RP settings later in the same request.

func CreateSessionDataFlow

func CreateSessionDataFlow(purpose string, userID int, sessionID, scope string, data *webauthn.SessionData) (string, int64, error)

func PopSessionDataFlow

func PopSessionDataFlow(token, purpose string, userID int, sessionID string) (*webauthn.SessionData, string, error)

Types

type WebAuthnUser

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

func NewWebAuthnUser

func NewWebAuthnUser(user *model.User, credential *model.PasskeyCredential) *WebAuthnUser

func (*WebAuthnUser) ModelUser

func (u *WebAuthnUser) ModelUser() *model.User

func (*WebAuthnUser) PasskeyCredential

func (u *WebAuthnUser) PasskeyCredential() *model.PasskeyCredential

func (*WebAuthnUser) WebAuthnCredentials

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

func (*WebAuthnUser) WebAuthnDisplayName

func (u *WebAuthnUser) WebAuthnDisplayName() string

func (*WebAuthnUser) WebAuthnID

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

func (*WebAuthnUser) WebAuthnName

func (u *WebAuthnUser) WebAuthnName() string

Jump to

Keyboard shortcuts

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