Functional Weave
Code in Rust

Results for “auth”

46 capabilities

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 Rust
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
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
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
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
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
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
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
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 Rust
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
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 Rust
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 Rust
crypto.sha256
The SHA-256 digest of a byte string (FIPS 180-4), in pure code that also runs in the browser.
sha256 in Rust
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
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 Rust
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
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 Rust