MEDIUM AI PREVALENCE: MEDIUM auth.csharp.jwt.require-expiration-disabled
A JWT setup sets RequireExpirationTime = false on TokenValidationParameters.
Why AI tools produce this: AI coding tools produce this regularly, typically when prompted for a shortcut or a quick fix.
Why this matters
Tokens without an exp claim are then accepted, so a leaked or stolen token stays valid forever: it can never expire or be timed out (CWE-613). This is a common AI-generated shortcut to accept tokens that happen to omit exp.
Leave RequireExpirationTime at its secure default (true) and keep ValidateLifetime = true so every token must carry an exp claim and is rejected once it lapses.
VULNERABLE
SAFE
Suppressing this rule
If a finding is a genuine false positive, scope the suppression to the exact line and leave a reason, never disable the rule project-wide. Disable directives are line-scoped by design.
// oauthlint-disable-next-line auth.csharp.jwt.require-expiration-disabled -- <reason>