> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keyport.sbs/llms.txt
> Use this file to discover all available pages before exploring further.

# Expiry Enforcement

> Control whether KeyPort blocks licenses that are past their expiry date.

Expiry enforcement controls whether KeyPort should actively block licenses that are past their expiry date.

This is one of the core product rules because it affects validation even when the rest of the license is otherwise valid.

## What this flag does

KeyPort stores expiry data on licenses, but this flag decides whether that expiry date is actually enforced during validation and related authorization checks.

## When it is on

* Licenses past their expiry date are rejected
* The validate flow can return an expired status
* Expiration behaves as a real enforcement rule, not just metadata

## When it is off

* KeyPort does not reject the license because it has passed its expiry date
* The stored expiry date can still exist for reporting or admin review
* Other checks still apply normally, such as revoked status or IP restrictions

## Example

Suppose a license expired on `2026-04-01`:

* If expiry enforcement is **on**, validation after that date returns an expired result
* If expiry enforcement is **off**, the same license can still validate as long as every other rule passes

## When to turn it on

Turn it on when:

* your licenses are sold for fixed terms
* renewals should immediately affect access
* expiry should block use without extra application logic

## When to turn it off

Turn it off when:

* you want expiry dates for reporting only
* access rules are handled outside the standard validate flow
* you are migrating older licenses and do not want expiry to block them yet

<Warning>
  Turning expiry enforcement off does not delete expiry dates. It only stops KeyPort from using them as a blocking rule.
</Warning>
