[GH-ISSUE #699] feat: Support custom TOKEN_EXPIRATION when generating a new token #8098

Closed
opened 2026-06-02 00:35:07 +03:00 by zhus · 2 comments
Owner

Originally created by @Evilmass on GitHub (Apr 27, 2026).
Original GitHub issue: https://github.com/sigoden/dufs/issues/699

https://github.com/sigoden/dufs/pull/603/changes#diff-212eed958dda431dc3bf15be7424ef556201e53143bbe8b19bb80e19e22e5cd9R20

Specific Demand

  1. Add the ability to query the expiration time of the current token.
  2. Support custom validity period when generating a new token, allowing manual specification of the token expiration time instead of using the fixed default duration.

Implement Suggestion

  1. Add relevant fields or APIs to return token creation time, expiration time and remaining valid time.
  2. Add an optional parameter for token issuance to customize the expire time and override the default expiration setting.
  3. Add parameter validation to limit the maximum token validity period to reduce potential security risks.

also for docker(compose) env value

Originally created by @Evilmass on GitHub (Apr 27, 2026). Original GitHub issue: https://github.com/sigoden/dufs/issues/699 https://github.com/sigoden/dufs/pull/603/changes#diff-212eed958dda431dc3bf15be7424ef556201e53143bbe8b19bb80e19e22e5cd9R20 ## Specific Demand 1. Add the ability to query the expiration time of the current token. 2. Support custom validity period when generating a new token, allowing manual specification of the token expiration time instead of using the fixed default duration. ## Implement Suggestion 1. Add relevant fields or APIs to return token creation time, expiration time and remaining valid time. 2. Add an optional parameter for token issuance to customize the expire time and override the default expiration setting. 3. Add parameter validation to limit the maximum token validity period to reduce potential security risks. also for docker(compose) env value
zhus closed this issue 2026-06-02 00:35:07 +03:00
Author
Owner

@sigoden commented on GitHub (May 7, 2026):

The token is specially designed for #522, mainly to solve the issue where some Android browsers are unable to carry auth information when downloading links, resulting in download failures. It is not recommended to use it as a normal token.

<!-- gh-comment-id:4393466571 --> @sigoden commented on GitHub (May 7, 2026): The token is specially designed for #522, mainly to solve the issue where some Android browsers are unable to carry auth information when downloading links, resulting in download failures. It is not recommended to use it as a normal token.
Author
Owner

@Evilmass commented on GitHub (May 7, 2026):

Okay, I'll tweak the code myself and use it.

<!-- gh-comment-id:4395429761 --> @Evilmass commented on GitHub (May 7, 2026): Okay, I'll tweak the code myself and use it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#8098