---
title: "network.user.token_valid_after@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/network.user.token_valid_after"
updated: null
---

# network.user.token\_valid\_after@1 · OpenVibe.Services

HTML: [network.user.token\_valid\_after@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/network.user.token_valid_after)

# NetworkUserTokenValidAfterPayload `network.user.token_valid_after@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.0.0
- Owner: network
- Visibility: first-party
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/events/payloads/network.user.token_valid_after.v1.json`](/docs/contracts/network.user.token_valid_after.json)

network.user.token\_valid\_after v1 (OpenVibe.Network server/auth/revocation.js). A person's tokens issued before valid\_after are no longer good: every service that accepts Network user tokens refuses one whose iat (seconds) \* 1000 is less than valid\_after (milliseconds), exactly as Network does, drops what it cached for that person's older tokens and closes the sockets they opened. Emitted in the transaction that moves the cutoff: a password change or reset, sign out everywhere, a ban, an account deletion, an account merged into another (ADR-029: its sessions moved to the survivor), or staff ending someone's sessions. Consumers keep the latest valid\_after per subject and ignore an older one (events can arrive out of order). Envelope: subject { type: user, id }, visibility internal, actor the person (their own change) or the staff member / system:network.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `subject` | object | yes | The person (identity.subject-ref@1, a user). | - `no other fields` |
| `subject.type` | const | yes |  | - `= "user"` |
| `subject.id` | string | yes |  | - `pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$` |
| `valid_after` | string | yes | Tokens issued before this instant are refused (compare iat \* 1000 < Date.parse(valid\_after)). | - `format date-time` |
| `reason` | enum | yes | Why the cutoff moved. Consumers treat every reason the same; it is for logs and support. | - `one of "password_changed", "password_reset", "signed_out_everywhere", "banned", "account_deleted", "staff_revoked", "account_merged"` |

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: account-merged

~~~~
{
  "subject": {
    "type": "user",
    "id": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3"
  },
  "valid_after": "2026-09-24T20:15:07Z",
  "reason": "account_merged"
}
~~~~

Valid: password-changed

~~~~
{
  "subject": {
    "type": "user",
    "id": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3"
  },
  "valid_after": "2026-09-24T20:15:07Z",
  "reason": "password_changed"
}
~~~~

Valid: signed-out-everywhere

~~~~
{
  "subject": {
    "type": "user",
    "id": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3"
  },
  "valid_after": "2026-09-24T20:15:00.000Z",
  "reason": "signed_out_everywhere"
}
~~~~

Rejected: guest-subject

~~~~
{
  "subject": {
    "type": "guest",
    "id": "gst_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3"
  },
  "valid_after": "2026-09-24T20:15:00Z",
  "reason": "signed_out_everywhere"
}
~~~~

Rejected: unknown-reason

~~~~
{
  "subject": {
    "type": "user",
    "id": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3"
  },
  "valid_after": "2026-09-24T20:15:00Z",
  "reason": "felt_like_it"
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('network.user.token_valid_after@1', value);   // { valid, errors: [{ path, message }] }
~~~~
