Sha256: d04852b3405f9019a5b3c786767f5c1cfb8fa05a61979f59c148d56e929cba34

Contents?: true

Size: 666 Bytes

Versions: 3

Compression:

Stored size: 666 Bytes

Contents

module Kontena::Cli::Certificate
  class AuthorizeCommand < Clamp::Command
    include Kontena::Cli::Common
    include Kontena::Cli::GridOptions


    parameter "DOMAIN", "Domain to authorize"

    def execute
      require_api_url
      token = require_token

      data = {domain: domain}
      response = client(token).post("certificates/#{current_grid}/authorize", data)
      puts "Authorization successfully created. Use the following details to create necessary validations:"
      puts "Record name:#{response['record_name']}"
      puts "Record type:#{response['record_type']}"
      puts "Record content:#{response['record_content']}"

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kontena-cli-0.15.0.rc3 lib/kontena/cli/certificate/authorize_command.rb
kontena-cli-0.15.0.rc2 lib/kontena/cli/certificate/authorize_command.rb
kontena-cli-0.15.0.rc1 lib/kontena/cli/certificate/authorize_command.rb