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

feat(set-session): ignore existing token if it is not valid for a minimum duration #363

Merged
merged 1 commit into from
Apr 27, 2024

Conversation

reubenmiller
Copy link
Owner

Control if an existing token should be reused or not by enforcing a minimum validity period. If the token is not valid for at least the given duration, then it will be ignored. This reduces the situations where

The default session.tokenValidFor value is 8h.

Example

Set a custom token validity period to 24 hours.

c8y settings update session.tokenValidFor 24h

When activating a session, the following warning will be displayed if the token is ignored if the token is not valid for at least 24 hours.

set-session my session
WARN    Ignoring existing token as it will expire soon. minimumValidFor=24h0m0s, tokenExpiresAt=2024-04-29T10:07:41+02:00

@reubenmiller reubenmiller merged commit 7de314d into v2 Apr 27, 2024
4 checks passed
@reubenmiller reubenmiller deleted the feat-control-token-renewal branch April 27, 2024 08:31
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.

1 participant