[PR #603] [MERGED] feat: support downloading via token auth #652

Closed
opened 2026-04-08 16:53:49 +03:00 by zhus · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/sigoden/dufs/pull/603
Author: @sigoden
Created: 8/2/2025
Status: Merged
Merged: 8/2/2025
Merged by: @sigoden

Base: mainHead: feat


📝 Commits (1)

  • 09e50a1 feat: support downloading via token auth

📊 Changes

7 files changed (+277 additions, -33 deletions)

View changed files

📝 Cargo.lock (+104 -0)
📝 Cargo.toml (+2 -0)
📝 assets/index.js (+36 -4)
📝 src/auth.rs (+66 -3)
📝 src/server.rs (+51 -24)
📝 src/utils.rs (+2 -2)
📝 tests/auth.rs (+16 -0)

📄 Description

Workflow

  • GET ?tokengen to generate token
  • GET ?token=xx to auth

Security

  • The token is bound to the path and user.
  • The token has an expiration time (currently set to 3 days).
  • The token can only be used with GET requests (download only).

Close #522


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/sigoden/dufs/pull/603 **Author:** [@sigoden](https://github.com/sigoden) **Created:** 8/2/2025 **Status:** ✅ Merged **Merged:** 8/2/2025 **Merged by:** [@sigoden](https://github.com/sigoden) **Base:** `main` ← **Head:** `feat` --- ### 📝 Commits (1) - [`09e50a1`](https://github.com/sigoden/dufs/commit/09e50a1cdde398b086dd518b8ae3123ccdc08240) feat: support downloading via token auth ### 📊 Changes **7 files changed** (+277 additions, -33 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+104 -0) 📝 `Cargo.toml` (+2 -0) 📝 `assets/index.js` (+36 -4) 📝 `src/auth.rs` (+66 -3) 📝 `src/server.rs` (+51 -24) 📝 `src/utils.rs` (+2 -2) 📝 `tests/auth.rs` (+16 -0) </details> ### 📄 Description ## Workflow - GET `?tokengen` to generate token - GET `?token=xx` to auth ## Security - The token is bound to the path and user. - The token has an expiration time (currently set to 3 days). - The token can only be used with GET requests (download only). Close #522 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
zhus added the pull-request label 2026-04-08 16:53:50 +03:00
zhus closed this issue 2026-04-08 16:53:50 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#652