-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Labels
C-enhancementCategory: EnhancementCategory: EnhancementM-apiModule: Programmatic APIModule: Programmatic APIP-mediumPriority: MediumPriority: Medium
Description
With the stabilization of credential-process in cargo, more routes can be protected with a token that cargo can provide. (this is kinda related to #93)
Are there any plans to add authentication to these other routes (I'm mostly interested in download)?
From a quick glance, I believe this could be achieved by adding an Auth parameter like it's done in publish:
alexandrie/crates/alexandrie/src/api/crates/publish.rs
Lines 195 to 197 in 4813442
| pub(crate) async fn put( | |
| State(state): State<Arc<AppState>>, | |
| Auth(author): Auth, |
We also probably need an additional configuration value to let users enable or disable this feature. Would you welcome a PR with such modifications?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: EnhancementCategory: EnhancementM-apiModule: Programmatic APIModule: Programmatic APIP-mediumPriority: MediumPriority: Medium