GithubHelp home page GithubHelp logo

cpe_remote auth headers about it-cpe HOT 6 CLOSED

facebook avatar facebook commented on May 2, 2024
cpe_remote auth headers

from it-cpe.

Comments (6)

clburlison avatar clburlison commented on May 2, 2024 1

For what it's worth this can be accomplished right now by editing cpe_remote/libraries/helpers.rb file with the following:

    def auth_headers(url, method)
      #CPE::Distro.auth_headers(url, method)
      require 'base64'
      {'AUTHORIZATION' => "Basic #{
        Base64.strict_encode64('username:password')}",
        'Content-Type' => 'application/data'
      }
    rescue StandardError
      Chef::Log.warn('Building auth headers failed')
      {}
    end

I tried a few variations of creating a CPE::Distro.auth_headers function in a separate helper library file but came up unsucessful. I'm sure that was user error on my part 🤷‍♂️

As for Erik's comment I think this could solved in the README as a new "authorzation" section. It would be nice to document how to add the CPE::Distro.auth_headers format so we could keep this in a sepreate non-cpe_remote cookbook.

Cheers

from it-cpe.

erikng avatar erikng commented on May 2, 2024

@mikedodge04 @chilcote did you guys ever finish this? I thought you did.

from it-cpe.

johnnyramos avatar johnnyramos commented on May 2, 2024

+1 - would be useful deal with us cloud folks.

from it-cpe.

DNSGeek avatar DNSGeek commented on May 2, 2024

Don't think this is still needed.

from it-cpe.

natewalck avatar natewalck commented on May 2, 2024

Why is this no longer needed? Has cpe_remote been updated to have this functionality?

from it-cpe.

erikng avatar erikng commented on May 2, 2024

Definitely still needed if the support hasn't been added.

from it-cpe.

Related Issues (20)

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.