CsrfOptionsValidator
Defined in: src/http/middleware/CsrfOptions.ts:76
Validates resolved CsrfOptionsType settings. All rules are
bespoke: secret is a string | Uint8Array union (byte length must be
= 16), and the cookie attributes are nested. A
secretthat is simply absent is a REQUIRED-field error enforced bycsrfProtection, not here — the validator only checks the validity of a PRESENT secret.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CsrfOptionsValidator():
CsrfOptionsValidator
Defined in: src/http/middleware/CsrfOptions.ts:77
Returns
Section titled “Returns”CsrfOptionsValidator
Overrides
Section titled “Overrides”OptionsValidator<CsrfOptionsType>.constructor
Methods
Section titled “Methods”validate()
Section titled “validate()”validate(
settings):void
Defined in: src/util/OptionsValidator.ts:75
Check the (merged) settings; throws OptionsError on the first
violation. Unset (undefined) fields always pass.
Parameters
Section titled “Parameters”settings
Section titled “settings”Partial<T>
Returns
Section titled “Returns”void
