Sha256: 4178558fbba243f01c764d4ef592f2997a6552ba7906f9c1becc16d55294e3d7

Contents?: true

Size: 1.56 KB

Versions: 11

Compression:

Stored size: 1.56 KB

Contents

#
# Copyright (C) 2013 Conjur Inc
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#

require 'conjur/cli'

class Conjur::Command::Pubkeys < Conjur::Command
  desc "Public keys service operations"

  command :pubkeys do |pubkeys|
    pubkeys.default_command :show

    pubkeys.desc "List public keys for the given user"
    pubkeys.arg_name "USER"
    pubkeys.command :show do |c|
      c.action do |global_options, options, args|
        username = require_arg args, "USER"
        puts Conjur::API.public_keys(username, account: Conjur.configuration.account)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
conjur-cli-6.2.6 lib/conjur/command/pubkeys.rb
conjur-cli-6.2.5 lib/conjur/command/pubkeys.rb
conjur-cli-6.2.4 lib/conjur/command/pubkeys.rb
conjur-cli-6.2.3 lib/conjur/command/pubkeys.rb
conjur-cli-6.2.2 lib/conjur/command/pubkeys.rb
conjur-cli-6.2.1 lib/conjur/command/pubkeys.rb
conjur-cli-6.2.0 lib/conjur/command/pubkeys.rb
conjur-cli-6.1.0 lib/conjur/command/pubkeys.rb
conjur-cli-6.0.1 lib/conjur/command/pubkeys.rb
conjur-cli-6.0.0 lib/conjur/command/pubkeys.rb
conjur-cli-6.0.0.rc1 lib/conjur/command/pubkeys.rb