Documents for @litert/jwt / Validators/Subject / ISubjectValidationOptions
Interface: ISubjectValidationOptions
Defined in: src/lib/Validators/Subject.ts:25
The options for JwtSubjectValidator.
Properties
allowlist
allowlist: (
string|RegExp| (v) =>boolean)[]
Defined in: src/lib/Validators/Subject.ts:35
The allowlist of subjects, the elements can be:
- A string: the
subclaim must be exactly the same as this string. - A RegExp: the
subclaim must match this regular expression. - A function: the function will be called with the
subclaim as the only argument, and should return true if the subject is allowed, or false otherwise.
claimRequired?
optionalclaimRequired:boolean
Defined in: src/lib/Validators/Subject.ts:42
Whether the sub claim is required.
Default
ts
truecustomName?
optionalcustomName:string
Defined in: src/lib/Validators/Subject.ts:49
A custom name for this validator.
Default
ts
'JwtSubjectValidator'