Giter Site home page Giter Site logo

Comments (1)

DavidJFelix avatar DavidJFelix commented on August 21, 2024

@insonifi I'm taking a look into this now.

Many web-login mechanisms require that you post to a login url to retrieve a session cookie then maintain and provide that session cookie in subsequent requests to prove that you are logged in. Adding this type of login functionality would likely be a very large change, but is possible.

Without migrating to powershell 3.0 mechanisms (and abandoning old platforms) we may be able to utilize the WebClient UploadString method to push login credentials to a login url, prior to using DownloadFile to actually retrieve the resource.

The above assumes that this is a traditional web login with session cookies mechanism, as this is common for build servers. An easier solution is available if the server you're authenticating with is able to accept basic authentication (Here is a test page to show you what basic authentication looks like) then what I can use the WebClient Headers.add method to put an "authentication" header with a value of "Basic <%= @authkey %>" and set @authkey to be `Stdlib::Base64("${username}:${password}").

I'm currently working on making puppet-download_file a bit more powerful and more platform agnostic (by possibly leveraging wget and curl for OSX/Linux). I'll keep you up to date on my efforts if you're still looking for a solution. I know March to November is a long wait, so this might not even be relevant.

from puppet-download_file.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.