Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web session handling in Scoop #4148

Open
jfastnacht opened this issue Oct 24, 2020 · 5 comments
Open

Web session handling in Scoop #4148

jfastnacht opened this issue Oct 24, 2020 · 5 comments

Comments

@jfastnacht
Copy link
Contributor

I recently stumbled over a problem regarding the installation of Foundry Virtual Tabletop via Scoop. The download requires you to be logged in, but the download URL is fixed:

https://foundryvtt.com/releases/download?version=$version&platform=windows

Without too much effort it is possible to simulate a login via PowerShell, fetch the sessionid cookie, which is needed for the download. Since Scoop got a cookie attribute I was then able to install it by setting the sessionid cookie within the manifest by hand. Of course that's not a proper solution for the problem. What I'm missing is a possibility to simulate the login and provide the sessionid cookie for Scoops download function before the download happens within Scoop.

Is Scoop supposed to be stateless or can we add some functionality to run scripts before the download happens to take care of logins, more complex cookie handling and such (something like pre_download, similar to pre_install)?

@CEbbinghaus
Copy link

This would solve the problem I am having when trying to let scoop download artifacts from an organization repository

@rashil2000
Copy link
Member

What is required to download from your org repo?

@CEbbinghaus
Copy link

I am still investigating ways to download the files. But ideally just a function to provide Headers/Cookies/QueryParamters would be ideal. Although it would be very hard to implement into the scoop ecosystem since it requires code logic which doesn't fit well with the JSON schema

@rashil2000
Copy link
Member

Query parameters can be added to the URL itself, right?

You can provide Headers using the config file. See #4254 (comment) and #5140 (reply in thread) for example.

@CEbbinghaus
Copy link

That is based on users defining a configuration value within their own config. This is meant more as a program specific configuration that lets packages define a way that they should be authenticated against. We would have several varied ways to download artifacts and having to ask the user to add a definition for every one and update it for packages that change seems unrealistic when considering that this would need to work for over 2k people

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants