/** * Security layer for input validation with size limits, application authentication, * CORS configuration, CSP and security headers, path traversal prevention, and secure * filesystem access. * * @module security * * @example Apply response security headers * ```ts * import { applySecurityHeaders, generateNonce } from "veryfront/security"; * * const response = new Response("Ready"); * applySecurityHeaders(response.headers, false, generateNonce(), null); * ``` */ import "../../_dnt.polyfills.js"; export { BaseHandler } from "./http/base-handler.js"; export type { HandlerHelpers } from "./http/base-handler.js"; export { CommonSchemas, createValidatedHandler, createValidationError, DEFAULT_LIMITS, INPUT_VALIDATION_FAILED, isRequestBodyTooLargeError, parseFormData, parseJsonBody, parseQueryParams, readBodyWithLimit, sanitizeData, validateRequestLimits, } from "./input-validation/index.js"; export type { ApplicationIdentity, AuthClaimPrimitive, AuthClaimValue, SerializedApplicationIdentity, SerializedAuthClaims, } from "./application-auth/types.js"; export type { ParseFormOptions, ParseJsonOptions, ParseQueryOptions, RequestLimits, ValidatedData, ValidatedHandlerConfig, ValidatedHandlerFunction, } from "./input-validation/index.js"; export { AuthHandler } from "./http/auth.js"; export { isValidSecurityConfig, loadSecurityConfig, SecurityConfigLoader } from "./http/config.js"; export { setCors } from "./http/middleware/index.js"; export type { AuthConfig, BasicAuthConfig, BearerAuthConfig, CORSConfig, CSPDirectives, OidcAuthConfig, SecurityConfig, TrustedProxyAuthConfig, } from "./http/middleware/index.js"; export { CsrfHandler } from "./http/csrf/index.js"; export { applyCsrfCookie, generateCsrfToken, validateCsrf } from "./csrf/index.js"; export type { CsrfConfig, CsrfTokenOptions } from "./csrf/index.js"; export { applyCORSHeaders, applyCORSHeadersSync, cors, corsSimple, DEFAULT_HEADERS as DEFAULT_CORS_HEADERS, DEFAULT_MAX_AGE as CORS_MAX_AGE, DEFAULT_METHODS as DEFAULT_CORS_METHODS, handleCORSPreflight, isPreflightRequest, shouldApplyCORS, validateCORSConfig, validateOrigin, validateOriginSync, } from "./http/cors/index.js"; export type { CORSConfig as CORSOptions, CORSHeaderOptions, CORSPreflightOptions, CORSValidationResult, OriginValidator, SyncCORSConfig, SyncCORSHeaderOptions, SyncOriginValidator, } from "./http/cors/index.js"; export { applySecurityHeaders, buildCacheControl, CACHE_DURATIONS, createResponseBuilder, generateNonce, getSecurityHeader, ResponseBuilder, } from "./http/response/index.js"; export type { CacheStrategy, ResponseBuilderConfig } from "./http/response/index.js"; export { createValidator, PathValidationError, sanitizePathForDisplay, validateLexicalPath, validatePath, validatePathSync, ValidationPresets, } from "./path-validation.js"; export type { LexicalPathValidationOptions, PathValidationPolicyOptions, ValidationLevel, ValidationOptions, ValidationResult, } from "./path-validation.js"; export { createSecureFs, SecureFs, SECURITY_VIOLATION, wrapAdapterWithSecurity, } from "./secure-fs.js"; export type { SecureFsConfig, SecurityContext, SecurityEvent } from "./secure-fs.js"; export { BUILD_HELPER_PERMISSIONS, SERVER_PERMISSIONS, WORKFLOW_RUN_PERMISSIONS, } from "./deno-permissions.js"; //# sourceMappingURL=index.d.ts.map