Documentation
¶
Overview ¶
Package passkeyhttp shares the WebAuthn transport between auth adapters. Package passkeyhttp 在 auth 适配器之间共享 WebAuthn 传输处理。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteError ¶
func WriteError(w http.ResponseWriter, err error) bool
WriteError writes known passkey errors; false leaves adapter errors to the caller. WriteError 写出已知通行密钥错误;false 表示由调用方处理适配器错误。
Types ¶
type Handler ¶
type Handler struct {
Service *passkey.Service
Authenticate routes.Middleware
UserID func(*http.Request) (string, bool)
Login func(http.ResponseWriter, *http.Request, string, []byte)
Failure func(http.ResponseWriter, error)
}
Handler shares ceremony and management routes; adapters own session issuance. Handler 共享流程与管理路由;适配器负责会话签发。