Class: Conjur::Core::API

Inherits:
API
  • Object
show all
Defined in:
lib/conjur/core-api.rb

Constant Summary

Constants inherited from API

API::VERSION

Instance Attribute Summary

Attributes inherited from API

#api_key, #username

Class Method Summary collapse

Methods inherited from API

#add_public_key, #audit, #audit_resource, #audit_role, authenticate, core_asset_host, #create_authn_user, #create_deputy, #create_group, #create_host, #create_layer, #create_resource, #create_role, #create_secret, #create_user, #create_variable, #credentials, #current_role, #delete_public_key, #deputy, enroll_host, #find_users, #group, #groups, #host, #initialize, #layer, layer_asset_host, #layers, login, login_cas, new_from_key, new_from_token, parse_id, parse_resource_id, parse_role_id, pubkeys_asset_host, #public_key, #public_keys, #resource, #resources, #role, #role_from_username, #role_name_from_username, #secret, #token, update_password, #user, #variable, #variable_values

Methods included from LogSource

#log

Methods included from Escape

#fully_escape, included, #path_escape, #query_escape

Constructor Details

This class inherits a constructor from Conjur::API

Class Method Details

.conjur_accountObject



37
38
39
# File 'lib/conjur/core-api.rb', line 37

def 
  info['account'] or raise "No account field in #{info.inspect}"
end

.hostObject



33
34
35
# File 'lib/conjur/core-api.rb', line 33

def host
  Conjur.configuration.core_url
end

.infoObject



41
42
43
# File 'lib/conjur/core-api.rb', line 41

def info
  @info ||= JSON.parse RestClient::Resource.new(Conjur::Core::API.host)['info'].get
end