Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add validation against provided timestamp #319

Open
jakubtrnka opened this issue Jun 21, 2023 · 1 comment
Open

Add validation against provided timestamp #319

jakubtrnka opened this issue Jun 21, 2023 · 1 comment

Comments

@jakubtrnka
Copy link

Greetings,

I need to validate the Claims against unix timestamp that I provide to the library. I can't rely that the local system time is always correct.

Function

pub fn get_current_timestamp() -> u64 {
    let start = SystemTime::now();
    start.duration_since(UNIX_EPOCH).expect("Time went backwards").as_secs()
}

that is used in Your library is not sufficient for my use case.

I'm willing to implement it myself and submit PR if you're okay with the concept.

@jakubtrnka
Copy link
Author

In the meantime I took the liberty and did it, because it's trivial.

#320

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant