Sha256: 7afec043a4b78ec7c46575ee550e28d922dda8c420edf734b46bcaf49bde49e5

Contents?: true

Size: 506 Bytes

Versions: 5

Compression:

Stored size: 506 Bytes

Contents

module Conjur
  class Host < RestClient::Resource
    include Exists
    include HasId
    include HasIdentifier
    include HasAttributes
    include ActsAsUser
    
    def login
      [ 'host', id ].join('/')
    end
    
    def api_key
      self.attributes['api_key']
    end
    
    def enrollment_url
      log do |logger|
        logger << "Fetching enrollment_url for #{id}"
      end
      self['enrollment_url'].head{|response, request, result| response }.headers[:location]
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
conjur-api-2.1.8 lib/conjur/host.rb
conjur-api-2.1.7 lib/conjur/host.rb
conjur-api-2.1.6 lib/conjur/host.rb
conjur-api-2.1.5 lib/conjur/host.rb
conjur-api-2.1.4 lib/conjur/host.rb