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.

Calling token information and renewal

See original GitHub issue

Is there a way to determine when the calling token (as created by a VaultClient instance) needs to be renewed? As far as I can tell there is a IVaultClient.RenewCallingTokenAsync method which allows you to renew the token but I can’t seem to figure out how to get information about the token so that I can determine what the lease time is etc. Without having the lease time it will be hard to determine when the lease should be renewed.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
rajanadarcommented, Jul 31, 2018

@pvandervelde Just published a new version of VaultSharp 0.10.4xxx

https://www.nuget.org/packages/VaultSharp/0.10.4000

In this redesigned library, I expose a property on every IAuthMethodInfo to see the login-token that was generated.

For 0.6.x, you may need to use reflection to peek into the _lazyVaultToken variable.

0reactions
rajanadarcommented, Jul 31, 2018

Thanks.

I realized that I was waiting too long after a vault api release to release the library with 100% feature set. Instead I have changed the model a bit. The 0.10.4000 release has all the most common features. And as per the need, quick increments of 4001,4002 etc can be published.

Also, I targeted. NET standard 2.0 for this, which may not be the case for the consumers. This library has been completely redesigned and hence trying out new things. There is an item in progress to try for. Net standard 1.x as well.

Let me know how it fits your needs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Token authentication for Web API renewal
Let's say I start up my service, I request a token, the token expires after 15 minutes, then after 20 minutes I make...
Read more >
Token Best Practices
Lists best practices when using tokens in authentication and authorization.
Read more >
Token Auth Method (API) - Vault
Renew a token (Self)​​ Renews a lease associated with the calling token. This is used to prevent the expiration of a token, and...
Read more >
Manage access tokens for API requests
The access_token can be used for as long as it's active, which is up to one hour after login or renewal. The refresh_token...
Read more >
Refresh, Revoke, and Limit Scope of OAuth Tokens
Renewing every 7 days or less provides sufficient time to discover and resolve errors. If your application only attempts to refresh tokens near...
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