Sha256: eb41aecb77d4c60f9d5d243ebb65fb222e3dabcf779f3527ef2abf4b66232329

Contents?: true

Size: 594 Bytes

Versions: 17

Compression:

Stored size: 594 Bytes

Contents

module Kontena::Cli::User
  class VerifyCommand < Clamp::Command
    include Kontena::Cli::Common

    parameter "TOKEN", "Kontena verify token"

    option "--auth-provider-url", "URL", "Auth provider URL", default: "https://auth.kontena.io/"

    def execute
      params = { token: token }
      begin
        auth_client = Kontena::Client.new(auth_provider_url)
        auth_client.post('user/email_confirm', params)
        puts 'Account verified'.colorize(:green)
      rescue Kontena::Errors::StandardError
        abort 'Invalid verify token'.colorize(:red)
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
kontena-cli-0.15.5 lib/kontena/cli/user/verify_command.rb
kontena-cli-0.15.5.rc2 lib/kontena/cli/user/verify_command.rb
kontena-cli-0.15.5.rc1 lib/kontena/cli/user/verify_command.rb
kontena-cli-0.15.4 lib/kontena/cli/user/verify_command.rb
kontena-cli-0.15.4.rc2 lib/kontena/cli/user/verify_command.rb
kontena-cli-0.15.4.rc1 lib/kontena/cli/user/verify_command.rb
kontena-cli-0.15.4.pre1 lib/kontena/cli/user/verify_command.rb
kontena-cli-0.15.3 lib/kontena/cli/user/verify_command.rb
kontena-cli-0.15.2 lib/kontena/cli/user/verify_command.rb
kontena-cli-0.15.1 lib/kontena/cli/user/verify_command.rb
kontena-cli-0.15.0 lib/kontena/cli/user/verify_command.rb
kontena-cli-0.15.0.rc3 lib/kontena/cli/user/verify_command.rb
kontena-cli-0.15.0.rc2 lib/kontena/cli/user/verify_command.rb
kontena-cli-0.15.0.rc1 lib/kontena/cli/user/verify_command.rb
kontena-cli-0.14.7 lib/kontena/cli/user/verify_command.rb
kontena-cli-0.14.6 lib/kontena/cli/user/verify_command.rb
kontena-cli-0.14.5 lib/kontena/cli/user/verify_command.rb