bolcom / unFTP

A FTP(S) server with a couple of twists written in Rust. Follow and talk to us on https://t.me/unftp. Docs on https://unftp.rs
Apache License 2.0
251 stars 19 forks source link

Add HTTP User Detail extension #171

Closed hannesdejager closed 1 month ago

hannesdejager commented 4 months ago

This adds functionality to unFTP that allows unFTP to obtain user detail over HTTP in addition to the already existing JSON file.

It uses the extact same format as the JSON file functionality. The 'usr-http-url' command line arguments activate this feature. You pass it a base URL, unFTP appends a username to it and performs a GET request to the URL. The HTTP server should respond with a 200 OK and JSON body containing an array of users which should at least contain the requested user's details.

Later on we can support diffent HTTP verbs and sending the username via an HTTP header instead of the URL path or Post body. For now I'm just keeping it simple.