Method: ChefAPI::Authentication.from_options

Defined in:
lib/chef-api/authentication.rb

.from_options(options = {}) ⇒ Object

Create a new signing object from the given options. All options are required.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :user (String)
  • :key (String, OpenSSL::PKey::RSA)
  • verb (String, Symbol)
  • :path (String)
  • :body (String, IO)

See Also:

  • ((#initialize)


42
43
44
45
46
47
48
49
50
# File 'lib/chef-api/authentication.rb', line 42

def from_options(options = {})
  user = options.fetch(:user)
  key  = options.fetch(:key)
  verb = options.fetch(:verb)
  path = options.fetch(:path)
  body = options.fetch(:body)

  new(user, key, verb, path, body)
end