passkeyhttp

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 共享流程与管理路由;适配器负责会话签发。

func (Handler) Routes

func (h Handler) Routes(maxBody int64, rate routes.Middleware) []routes.Route

Routes builds relative routes with body limits and the adapter's rate limiter. Routes 构造相对路由,使用请求体限制及适配器的限流器。

Jump to

Keyboard shortcuts

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