- changed status to resolved
API access through curl
Issue #4
resolved
It would be neat if we could curl the archive URL and get archives without hardcoding the user/pass in the URL.
I'm not too familiar with how plugins are structured but if you can return a proper challenge (401) when the user doesn't have auth (instead of what stash does with the redirect) then it would work nicely.
This would really help as I'd like to use these archive URLs in requirements listings for python and I'd rather not hardcode passwords in the repository.
Comments (1)
-
Account Deactivated - Log in to comment
This is really a Bitbucket Server issue, not something specific to this plugin. I'd encourage you to vote for BSERV-2722 and/or BSERV-4989 to get something like token or access key-based access.
As for a "proper challenge", I can't speak for what the plugin did before, but my changes in version 2.1 add a REST endpoint (to replace the servlet, though that does still exist for backward compatibility). If you use the REST endpoint, I think it does exactly what you're looking for:
I've reimplemented the servlet to internally forward (no redirect; it's handled in the same server request) to REST, so using that produces the same 401: