---
title: "Discussion on \"Mocking Token Expiry Based on Clock Time, Not Request Count\" | Hashnode"
description: "Discussion on \"Mocking Token Expiry Based on Clock Time, Not Request Count\". A token expires at a moment in time, so the mock should judge it on the clock."
url: "https://hashnode.com/posts/mocking-token-expiry-based-on-clock-time/6af5e37a53cfd6e7ea3c4e6e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Mocking Token Expiry Based on Clock Time, Not Request Count](https://blogs.powerduck.com/mocking-token-expiry-based-on-clock-time?utm_source=hashnode&utm_medium=feed)

A token expires at a moment in time, so the mock should judge it on the clock.

Nov 12 · 4 min read · blogs.powerduck.com  
Read the article

-   [#api](https://hashnode.com/tag/api)
-   [#testing](https://hashnode.com/tag/testing)
-   [#security](https://hashnode.com/tag/security)
-   [#programming](https://hashnode.com/tag/programming)

## Written by

[Powerduck](https://hashnode.com/@powerduck)

@powerduck · hon

  
[View profile](https://hashnode.com/@powerduck)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
