Alex Dunmow 8bd92ea5c4 feat(captcha): single-use verification tokens (replay hardening)
VerifyToken now consumes a redemption token on its first successful verify:
a replayed token within its 5-min TTL is rejected. Mirrors the existing
single-use challenge-nonce store with a per-Server used-token store keyed on
the token's random id, same GC/expiry approach (entries live only for the
remaining TTL). The token is burned only on a successful verify (valid HMAC +
unexpired + unused); forged/expired tokens never touch the store.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 12:32:52 +08:00
2026-06-18 16:46:53 +08:00
2026-06-18 16:46:53 +08:00

BlockNinja Plugin SDK

Types, interfaces, and utilities for building BlockNinja plugins.

Package Structure

Package Purpose
plugin/ PluginRegistration, CoreServices, RegisterFunc
blocks/ BlockMeta, BlockFunc, BlockRegistry interface, BlockContext
blocks/builtin/ Reusable block implementations (HTMLBlock)
templates/ TemplateRegistry interface
templates/bn/ Shared templ components (head, engagement, toolbar)
auth/ Claims types, context extractors
content/ Content access interface
settings/ Settings access interface
gating/ Access gating evaluation
crypto/ Encrypt/Decrypt interface
render/ Rich text rendering utilities
video/ Video embed URL parsing
ai/ AI tool registry interface and types
rbac/ Role type definition

Usage

import "git.dev.alexdunmow.com/ninja/core/plugin"
Description
No description provided
Readme 2 MiB
Languages
Go 83.5%
templ 15.5%
Makefile 1%