Sha256: 07366b71336163cd4880e735336a8cedeb0ba13f2c7d30cf4b9b6e80dea1a8cf

Contents?: true

Size: 678 Bytes

Versions: 11

Compression:

Stored size: 678 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']}.#{domain}"
      puts "Record type: #{response['record_type']}"
      puts "Record content: #{response['record_content']}"
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
kontena-cli-0.15.5 lib/kontena/cli/certificate/authorize_command.rb
kontena-cli-0.15.5.rc2 lib/kontena/cli/certificate/authorize_command.rb
kontena-cli-0.15.5.rc1 lib/kontena/cli/certificate/authorize_command.rb
kontena-cli-0.15.4 lib/kontena/cli/certificate/authorize_command.rb
kontena-cli-0.15.4.rc2 lib/kontena/cli/certificate/authorize_command.rb
kontena-cli-0.15.4.rc1 lib/kontena/cli/certificate/authorize_command.rb
kontena-cli-0.15.4.pre1 lib/kontena/cli/certificate/authorize_command.rb
kontena-cli-0.15.3 lib/kontena/cli/certificate/authorize_command.rb
kontena-cli-0.15.2 lib/kontena/cli/certificate/authorize_command.rb
kontena-cli-0.15.1 lib/kontena/cli/certificate/authorize_command.rb
kontena-cli-0.15.0 lib/kontena/cli/certificate/authorize_command.rb