auth.validate-registration
Validate a sign-up form (email, password, name) in one call, with a message per field, in the browser and the API alike.
validate_registration in Python
1.0.0
py rs ts
14 tests
Apache-2.0
auth.account-link
Decide whether an OAuth sign-in signs in, links to an existing account by verified email, creates one, or is refused.
decide_account_link in Python
1.0.0
py rs ts
16 tests
Apache-2.0
auth.oauth-sign-in Integration · does I/O TypeScript only
Sign users in with OpenID Connect or GitHub (authorisation code + PKCE), and keep them in a signed session cookie.
Not available in Python
1.0.0
ts
54 tests
MIT
auth.validate-login
Check a login form (email, password): the normalised email to look up, or a message for each field to fix.
validate_login in Python
1.0.0
py rs ts
11 tests
Apache-2.0
auth.access-token
Issue an API's HS256 access token, read one from an Authorization header, and refuse revoked or superseded ones.
A group of 3: issue_access_token, read_access_token, confirm_access_token
1.0.0
py rs ts
33 tests
Apache-2.0
auth.validate-password-change
Check a change-password form: current password given and correct, new one meeting the policy and different.
validate_password_change in Python
1.0.0
py rs ts
15 tests
Apache-2.0
auth.totp
Authenticator-app two-factor codes (TOTP RFC 6238, HOTP RFC 4226): secret, QR URI, codes, verify with window and drift.
A group of 5: totp_secret, totp_uri, hotp_code, totp_code, verify_totp
1.0.0
py rs ts
80 tests
Apache-2.0
auth.jwt
Sign, verify and decode HS256 JSON Web Tokens (RFC 7519): signature, algorithm and exp/nbf/iat checked with leeway.
A group of 3: sign_jwt, verify_jwt, decode_jwt
1.0.0
py rs ts
54 tests
Apache-2.0
auth.rbac
Roles with inheritance, permission checks with wildcards and ownership, and a generated per-role access-test matrix.
A group of 4: resolve_roles, has_permission, check_access, access_matrix
1.0.0
py rs ts
54 tests
Apache-2.0
auth.bearer-token
The token from an HTTP Authorization header of the form "Bearer <token>" (RFC 6750), or null if it has none.
parse_bearer_token in Python
1.0.0
py rs ts
18 tests
Apache-2.0
auth.recovery-codes
Two-factor recovery codes: generate from caller entropy, hash for storage, and verify-and-consume as a pure step.
A group of 4: generate_recovery_codes, normalise_recovery_code, hash_recovery_code, consume_recovery_code
1.0.0
py rs ts
39 tests
Apache-2.0
auth.password-hash
Hash a password for storage as pbkdf2_sha256$iterations$salt$hash, verify one in constant time, and spot weak hashes.
A group of 3: hash_password, verify_password, password_needs_rehash
1.0.0
py rs ts
36 tests
Apache-2.0
auth.password-policy
Check a new password against a named policy (NIST SP 800-63B-4 by default): length, common passwords, name and email.
A group of 2: password_policy, check_password
1.0.1
py rs ts
31 tests
Apache-2.0 AND OGL-UK-3.0
auth.email-token
Hashed single-use tokens for email verification, password reset and magic links, with expiry, as pure steps.
A group of 4: generate_email_token, hash_email_token, check_email_token, consume_email_token
1.0.0
py rs ts
43 tests
Apache-2.0
auth.login-throttle
Allow a login attempt or lock the account out, from its recent failed attempts, with the seconds until it may retry.
login_throttle in Python
1.0.0
py rs ts
19 tests
Apache-2.0
auth.normalise-email
Trim an email address and lower-case its domain for storage and lookup, or null if it is not a plausible address.
normalise_email in Python
1.0.0
py rs ts
12 tests
Apache-2.0
react.form.password-field React ^19 · TypeScript only
A password input with a Show/Hide button and an optional live checklist of a password policy (GOV.UK password input).
Not available in Python
1.0.1
ts
22 tests
Apache-2.0
crypto.hmac-sha1
HMAC-SHA1 of a message under a secret key (RFC 2104, RFC 2202), the MAC under HOTP and TOTP codes.
hmac_sha1 in Python
1.0.0
py rs ts
14 tests
Apache-2.0
encoding.base32
Bytes to RFC 4648 base32 text (A-Z, 2-7) and back, strictly, as authenticator-app secrets are written.
A group of 2: base32_encode, base32_decode
1.0.0
py rs ts
36 tests
Apache-2.0
crypto.pbkdf2-sha256
PBKDF2 with HMAC-SHA256 (RFC 8018): derive a key from a password and salt, slowly, fast enough for a login request.
pbkdf2_sha256 in Python
1.0.0
py rs ts
14 tests
Apache-2.0
crypto.hmac-sha256
HMAC-SHA256 of a message under a secret key (RFC 2104, RFC 4231), in pure code that also runs in the browser.
hmac_sha256 in Python
1.0.0
py rs ts
13 tests
Apache-2.0
email.send Integration · does I/O TypeScript only
Send a transactional email through Resend, any SMTP server or the log, behind one call.
Not available in Python
1.0.0
ts
17 tests
MIT
crypto.sha1
The SHA-1 digest of a byte string (FIPS 180-4), for HMAC-SHA1 in HOTP/TOTP codes; not for new signatures.
sha1 in Python
1.0.0
py rs ts
14 tests
Apache-2.0
crypto.sha256
The SHA-256 digest of a byte string (FIPS 180-4), in pure code that also runs in the browser.
sha256 in Python
1.0.0
py rs ts
13 tests
Apache-2.0
encoding.hex
Bytes to lowercase hexadecimal text and back (RFC 4648 base16), strictly, identically in every language.
A group of 2: hex_encode, hex_decode
1.0.0
py rs ts
25 tests
Apache-2.0
form.state TypeScript only
A form's state as a pure reducer: values, touched fields, validator errors and the submit, for useReducer.
Not available in Python
1.0.1
ts
40 tests
Apache-2.0
validation.email
Is this a plausible email address? A documented, pragmatic subset of RFC 5322, not the full grammar.
is_email in Python
1.0.0
py rs ts
28 tests
Apache-2.0
validation.iban
Check an IBAN against the ISO 13616 mod-97-10 checksum and the registered length for its country.
is_iban in Python
1.0.0
py rs ts
22 tests
Apache-2.0
validation.lei
Check a 20-character Legal Entity Identifier against its ISO 17442 / ISO 7064 MOD 97-10 check digits.
validate_lei in Python
1.0.0
py rs ts
14 tests
Apache-2.0
finance.ledger.journal-validate
Check a double-entry journal: debits equal credits, no zero or two-sided lines, one currency, well-formed account codes.
validate_journal in Python
1.0.0
py rs ts
16 tests
Apache-2.0
validation.luhn
Check a digit string against the Luhn mod-10 checksum used by payment cards and many identifiers.
is_luhn in Python
1.0.0
py rs ts
18 tests
Apache-2.0
text.initials
Initials from a personal name for avatars and signatures: "Jean-Paul Sartre" is "JPS".
initials in Python
1.0.0
py rs ts
17 tests
Apache-2.0
validation.bic
Check the format of a SWIFT/BIC code (8 or 11 characters) and split it into its parts.
validate_bic in Python
1.0.0
py rs ts
15 tests
Apache-2.0
validation.uk-utr
Check an HMRC Unique Taxpayer Reference's modulus 11 check digit, accepting the K and spacing people type.
validate_uk_utr in Python
2.0.1
py rs ts
18 tests
Apache-2.0
crypto.constant-time-equal
Compare two byte strings in time that does not depend on where they differ, for checking MACs and hashes.
constant_time_equal in Python
1.0.0
py rs ts
12 tests
Apache-2.0
validation.vin
Check a 17-character vehicle identification number and its check digit; enforced for North American VINs.
validate_vin in Python
1.0.0
py rs ts
17 tests
Apache-2.0
net.device-validate
Validate one network inventory entry: name, host, ports, optional MAC and subnet, with every problem listed.
validate_device in Python
1.0.0
py rs ts
17 tests
Apache-2.0
insurance.age-banding Unreviewed
Age at policy inception and the rating band it falls in, from a table of age bands.
age_band in Python
1.0.1
py rs ts
18 tests
Apache-2.0
net.hostname-validate
Check a host name against RFC 1123 and RFC 952 label rules and length limits, and normalise it.
validate_hostname in Python
1.0.0
py rs ts
26 tests
Apache-2.0
subscriptions.ltv-cac
Customer lifetime value, LTV to CAC ratio and CAC payback months from ARPA, gross margin, churn and CAC.
ltv_cac in Python
1.0.0
py rs ts
14 tests
Apache-2.0
legal.conflict-name-match Unreviewed
Fuzzy-match a name against existing clients and parties for a conflict check: normalised, token-sorted Jaro-Winkler.
conflict_name_match in Python
1.0.1
py rs ts
18 tests
Apache-2.0
finance.ledger.trial-balance
Trial balance from journal lines: debit or credit balance per account, and proof that debits equal credits.
trial_balance in Python
1.0.0
py rs ts
13 tests
Apache-2.0
construction.retention
Retention held and released on a construction valuation: full rate, half at practical completion, none at the end.
retention in Python
1.0.0
py rs ts
17 tests
Apache-2.0
todo.item
The to-do item type (Todo, TodoDraft, Recurrence) and its validators, with a message per field.
A group of 2: validate_draft, validate_todo
1.0.0
py rs ts
51 tests
Apache-2.0
validation.uk-vat-number
Check a UK VAT registration number against HMRC's mod-97 checksum, including the post-2010 9755 variant.
is_uk_vat_number in Python
1.0.0
py rs ts
22 tests
Apache-2.0
hospitality.tronc-allocation
Share a tips pool (tronc) between staff by hours worked, points, or hours times points, exactly to the penny.
tronc_allocation in Python
1.0.0
py rs ts
19 tests
Apache-2.0