question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add `isExpired` to TokenHolder

See original GitHub issue

Describe the problem you’d like to have solved

It would be great if we could determine if the token inside a TokenHolder was still valid, from a time perspective.

Describe the ideal solution

An isExpired() method for TokenHolder that would return true if the exp time has passed for the token, otherwise false.

Alternatives and current work-arounds

Decode the token manually and check the exp time like: JWT.decode(managementToken.getAccessToken()).getExpiresAt().toInstant().isBefore(Instant.now())

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lbalmacedacommented, Jul 5, 2021

@jimmyjames @pennstatephil this is now released under 1.32.0

1reaction
pennstatephilcommented, Jun 29, 2021

@jimmyjames The PR looks great- can’t wait to give it a try. Thank you for implementing it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

solidity - Leasing a token with smart contract?
You can set the timeframe in the smart contract and have the token holder periodically check if it is expired.
Read more >
UsernameToken.IsExpired Property - Microsoft Learn
Gets a value indicating whether the UsernameToken is expired. Namespace: Microsoft.Web.Services3.Security.Tokens Assembly: Microsoft.Web.
Read more >
Response Wrapping | Vault - HashiCorp Developer
Perform a lookup on the response-wrapping token. This immediately tells you if the token has already been unwrapped or is expired (or otherwise...
Read more >
TokenScope: Automatically Detecting Inconsistent Behaviors ...
e.g., query the balance of a token holder, transfer tokens to another holder. ... transaction that invokes a smart contract, we insert recording...
Read more >
OAuthAuthenticationProvider xref - Apache Chemistry
readLock().unlock(); 238 } 239 } 240 241 /** 242 * Adds a token listener. ... If no access token is present or the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found