Skip to content

Add unit tests for the token expiry validator correctly computing the expiry timestamp from the issued-at claim #769

Description

@Chucks1093

Summary

The token expiry validator computes the expected expiry as iat + ttlSeconds and rejects tokens where exp does not match. Unit tests should confirm the validator accepts tokens with a matching expiry and rejects those where exp has been tampered with.

Scope

  • Test a token where exp === iat + ttl passes validation
  • Test a token where exp > iat + ttl fails with token_expiry_tampered
  • Test a token where exp < iat + ttl fails with token_expiry_tampered
  • Test a token with no iat claim fails with missing_iat

Acceptance Criteria

  • Correct exp passes validation
  • Extended exp fails with token_expiry_tampered
  • Shortened exp fails with token_expiry_tampered
  • Missing iat fails with missing_iat

ETA: 12 hours


Coordinate on Telegram

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions