mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-08 16:49:02 +03:00
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/sigoden/dufs/pull/595
Author: @52funny
Created: 7/15/2025
Status: ❌ Closed
Base:
main← Head:issue522📝 Commits (1)
f26e22efeat: support authentication via token (#522)📊 Changes
5 files changed (+130 additions, -29 deletions)
View changed files
📝
Cargo.lock(+6 -5)📝
Cargo.toml(+2 -0)📝
assets/index.js(+11 -8)📝
src/auth.rs(+77 -3)📝
src/server.rs(+34 -13)📄 Description
This PR introduces a token-based access mechanism to support authenticated access to resource files via URL parameters. With this enhancement, clients can include a token in the URL to bypass unauthorized status codes and access protected resources directly.
Example
Resource access URLs are transformed as follows:
Token Design
UserTokenstruct:auth.rs#L50UserTokenis currently a wrapper around aString, making it easy to switch to other token formats (e.g., JWT) in the future.Access Policy
The access flow is defined as follows:
auth.rs#L160tokenis present in the URL, access is granted.WWW-Authenticateheader.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.