The primitives behind the defaults, exported so application code can use the same ones.
hashPassword / verifyPassword
scrypt hashing and constant-time comparison.
validate(body, rules)
Rule-based validation returning valid, values, errors.
generateKey / appKey
Create and read the application key.
sign / unsign / safeEqual
Signed payloads and constant-time comparison.
csrfToken / verifyCsrf
Issue and check CSRF tokens.
securityHeaders / corsHeaders
The header sets applied per response.
RateLimiter / clientAddress
Limiting, and the address it counts against.
parseCookies / serializeCookie
Cookie handling.
securityProfile(name, overrides)
Resolve the standard, strict, or banking posture, merged per section.
createApiKey / hashApiKey / verifyApiKey
Issue a bearer credential, store only its hash, compare in constant time.
requireApiKey({ lookup, scopes })
Middleware that authenticates a bearer key and sets context.principal.
randomToken(bytes)
Cryptographically random token, base64url encoded.
CAPACITOR_ORIGINS
The origins a packaged mobile build calls your API from.