lib/conjur/api.rb in conjur-api-4.23.0 vs lib/conjur/api.rb in conjur-api-4.24.0
- old
+ new
@@ -43,10 +43,11 @@
require 'conjur/pubkeys-api'
require 'conjur/host-factory-api'
require 'conjur/bootstrap'
require 'conjur-api/version'
require 'conjur/api/info'
+require 'conjur/api/ldapsync'
# Monkey patch RestClient::Request so it always uses
# :ssl_cert_store. (RestClient::Resource uses Request to send
# requests, so it sees :ssl_cert_store, too).
class RestClient::Request
@@ -55,18 +56,18 @@
def default_args
{
ssl_cert_store: OpenSSL::SSL::SSLContext::DEFAULT_CERT_STORE
}
end
-
+
def initialize args
initialize_without_defaults default_args.merge(args)
end
-
+
end
-
+
class RestClient::Resource
include Conjur::Escape
include Conjur::LogSource
include Conjur::Cast
extend Conjur::BuildFromResponse
@@ -117,14 +118,14 @@
JSON.parse(Base64.decode64($1))
else
raise AuthorizationError.new("Authorization missing")
end
end
-
+
def remote_ip
options[:headers][:x_forwarded_for]
end
-
+
def conjur_privilege
options[:headers][:x_conjur_privilege]
end
def audit_roles