otplib API Documentation / @otplib/core / OTPGuardrails
Type Alias: OTPGuardrails
OTPGuardrails =
Readonly<OTPGuardrailsConfig> &object
Defined in: packages/core/src/utils.ts:130
Complete guardrails configuration
This represents the final, immutable configuration used by validation functions. Internally tracks whether any values were overridden from RFC recommendations, enabling security auditing and compliance monitoring without exposing implementation details in the public API.
The override status is stored using a module-private Symbol that cannot be accessed or recreated outside this module, providing true encapsulation.
Type Declaration
[OVERRIDE_SYMBOL]?
optional[OVERRIDE_SYMBOL]:boolean
See
- OTPGuardrailsConfig for the base configuration structure
- createGuardrails for creating guardrails instances
- hasGuardrailOverrides to check if guardrails were customized