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

chore: expose Claims is_within_time_window as pub #794

Merged
merged 2 commits into from
May 28, 2024

Conversation

Rjected
Copy link
Contributor

@Rjected Rjected commented May 28, 2024

Motivation

Re-creating a Client when the claims are out of date is necessary if a custom transport using jwt will be used for more than 60 seconds. To do this, the transport could re-create only if the current claims are within the time window. However, this method is private, so no such custom transport can be created without pasting the existing methods and constants.

Solution

Expose is_within_time_window

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@DaniPopes
Copy link
Member

with_current_timestamp too?

@Rjected
Copy link
Contributor Author

Rjected commented May 28, 2024

with_current_timestamp too?

sure, just exposed that too

@DaniPopes DaniPopes merged commit fb2ff0d into alloy-rs:main May 28, 2024
24 checks passed
ben186 pushed a commit to ben186/alloy that referenced this pull request Jul 27, 2024
* chore: expose Claims is_within_time_window as pub

* expose with_current_timestamp
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

Successfully merging this pull request may close these issues.

3 participants